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
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 Details
-
SharedProcessor
public SharedProcessor() -
SharedProcessor
-
-
Method Details
-
addAndStartListener
First adds the specific processorListener then starts the listener with executor.- Parameters:
processorListener- specific processor listener
-
addListener
Adds the specific processorListener, but not start it.- Parameters:
processorListener- specific processor listener
-
run
public void run()Starts the processor listeners. -
distribute
Distribute the object amount listeners.- Parameters:
obj- specific objisSync- whether in sync or not
-
shouldResync
public boolean shouldResync() -
stop
public void stop()
-