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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(TransientStoreListener listener) Adds a listener that observes storeevents.protected voidfireListeners(TransientStoreEvent<?> event) keys()Returns an iterator of keys.voidremoveListener(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, waitMethods inherited from interface java.lang.AutoCloseable
closeMethods 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:TransientStoreReturns an iterator of keys.- Specified by:
keysin interfaceTransientStore<V>
-
values
Description copied from interface:TransientStoreReturns an iterator of values.- Specified by:
valuesin interfaceTransientStore<V>
-
fireListeners
-
addListener
Description copied from interface:TransientStoreAdds 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 consumerremovesits listener once it is done observing events.- Specified by:
addListenerin interfaceTransientStore<V>- See Also:
-
removeListener
Description copied from interface:TransientStoreRemoves the given listener from this store if exists, has no effect otherwise.- Specified by:
removeListenerin interfaceTransientStore<V>
-