Class SharedProcessor<T>
- java.lang.Object
-
- io.fabric8.kubernetes.client.informers.cache.SharedProcessor<T>
-
public class SharedProcessor<T> extends Object
SharedProcessor class manages all the registered ProcessListener and distributes notifications. This has been taken from official-client: https://github.com/kubernetes-client/java/blob/master/util/src/main/java/io/kubernetes/client/informer/cache/SharedProcessor.java
-
-
Constructor Summary
Constructors Constructor Description SharedProcessor()SharedProcessor(ExecutorService threadPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAndStartListener(ProcessorListener<T> processorListener)First adds the specific processorListener then starts the listener with executor.voidaddListener(ProcessorListener<T> processorListener)Adds the specific processorListener, but not start it.voiddistribute(ProcessorListener.Notification<T> obj, boolean isSync)Distribute the object amount listeners.voidrun()Starts the processor listeners.booleanshouldResync()voidstop()
-
-
-
Constructor Detail
-
SharedProcessor
public SharedProcessor()
-
SharedProcessor
public SharedProcessor(ExecutorService threadPool)
-
-
Method Detail
-
addAndStartListener
public void addAndStartListener(ProcessorListener<T> processorListener)
First adds the specific processorListener then starts the listener with executor.- Parameters:
processorListener- specific processor listener
-
addListener
public void addListener(ProcessorListener<T> processorListener)
Adds the specific processorListener, but not start it.- Parameters:
processorListener- specific processor listener
-
run
public void run()
Starts the processor listeners.
-
distribute
public void distribute(ProcessorListener.Notification<T> obj, boolean isSync)
Distribute the object amount listeners.- Parameters:
obj- specific objisSync- whether in sync or not
-
shouldResync
public boolean shouldResync()
-
stop
public void stop()
-
-