Class BaseTransientStore<V>
java.lang.Object
org.apache.drill.exec.coord.store.BaseTransientStore<V>
- All Implemented Interfaces:
AutoCloseable
,TransientStore<V>
- Direct Known Subclasses:
MapBackedStore
,ZkEphemeralStore
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(TransientStoreListener listener) Adds a listener that observes storeevents
.protected void
fireListeners
(TransientStoreEvent<?> event) keys()
Returns an iterator of keys.void
removeListener
(TransientStoreListener listener) Removes the given listener from this store if exists, has no effect otherwise.values()
Returns an iterator of values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.AutoCloseable
close
Methods inherited from interface org.apache.drill.exec.coord.store.TransientStore
entries, get, put, putIfAbsent, remove, size
-
Field Details
-
config
-
-
Constructor Details
-
BaseTransientStore
-
-
Method Details
-
getConfig
-
keys
Description copied from interface:TransientStore
Returns an iterator of keys.- Specified by:
keys
in interfaceTransientStore<V>
-
values
Description copied from interface:TransientStore
Returns an iterator of values.- Specified by:
values
in interfaceTransientStore<V>
-
fireListeners
-
addListener
Description copied from interface:TransientStore
Adds a listener that observes storeevents
. Note that i) Calling this method with the same listener instance more than once has no effect. ii) Listeners are not necessarily invoked from the calling thread. Consumer should consider thread safety issues. iii) Subclasses might hold a strong reference to the listener. It is important that consumerremoves
its listener once it is done observing events.- Specified by:
addListener
in interfaceTransientStore<V>
- See Also:
-
removeListener
Description copied from interface:TransientStore
Removes the given listener from this store if exists, has no effect otherwise.- Specified by:
removeListener
in interfaceTransientStore<V>
-