Class ListenerContainer<T>
- java.lang.Object
-
- org.apache.curator.framework.listen.ListenerContainer<T>
-
- All Implemented Interfaces:
Listenable<T>
@Deprecated public class ListenerContainer<T> extends java.lang.Object implements Listenable<T>
Deprecated.PreferMappingListenerManagerandStandardListenerManagerAbstracts an object that has listeners
-
-
Constructor Summary
Constructors Constructor Description ListenerContainer()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddListener(T listener)Deprecated.Add the given listener.voidaddListener(T listener, java.util.concurrent.Executor executor)Deprecated.Add the given listener.voidclear()Deprecated.Remove all listenersvoidforEach(com.google.common.base.Function<T,java.lang.Void> function)Deprecated.Utility - apply the given function to each listener.voidremoveListener(T listener)Deprecated.Remove the given listenerintsize()Deprecated.Return the number of listeners
-
-
-
Method Detail
-
addListener
public void addListener(T listener)
Deprecated.Description copied from interface:ListenableAdd the given listener. The listener will be executed in the containing instance's thread.- Specified by:
addListenerin interfaceListenable<T>- Parameters:
listener- listener to add
-
addListener
public void addListener(T listener, java.util.concurrent.Executor executor)
Deprecated.Description copied from interface:ListenableAdd the given listener. The listener will be executed using the given executor- Specified by:
addListenerin interfaceListenable<T>- Parameters:
listener- listener to addexecutor- executor to run listener in
-
removeListener
public void removeListener(T listener)
Deprecated.Description copied from interface:ListenableRemove the given listener- Specified by:
removeListenerin interfaceListenable<T>- Parameters:
listener- listener to remove
-
clear
public void clear()
Deprecated.Remove all listeners
-
size
public int size()
Deprecated.Return the number of listeners- Returns:
- number
-
forEach
public void forEach(com.google.common.base.Function<T,java.lang.Void> function)
Deprecated.Utility - apply the given function to each listener. The function receives the listener as an argument.- Parameters:
function- function to call for each listener
-
-