@PublicApi
public interface CachedReference<V>
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(CachedReferenceListener<V> listener,
boolean includeValues)
Adds a
CachedReferenceListener |
V |
get()
Get a value from the cache.
|
void |
removeListener(CachedReferenceListener<V> listener)
Removes a
CachedReferenceListener |
void |
reset()
Resets (clears/invalidates) this reference.
|
void reset()
void addListener(@Nonnull CachedReferenceListener<V> listener, boolean includeValues)
CachedReferenceListenerlistener - the listenerincludeValues - if the events sent to this listener will include old/new value. This can be used in cases
when the cost of finding these values is big (network sync) but the listener is not interested in the concrete
values for events its getting. The support for this parameter is optional and implementation dependentvoid removeListener(@Nonnull CachedReferenceListener<V> listener)
CachedReferenceListenerlistener - the listenerCopyright © 2015 Atlassian. All rights reserved.