Class SharedProcessor<ApiType extends io.kubernetes.client.common.KubernetesObject>
java.lang.Object
io.kubernetes.client.informer.cache.SharedProcessor<ApiType>
public class SharedProcessor<ApiType extends io.kubernetes.client.common.KubernetesObject>
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionSharedProcessor
(ExecutorService threadPool) SharedProcessor
(ExecutorService threadPool, Duration timeout) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAndStartListener
(ProcessorListener<ApiType> processorListener) addAndStartListener first adds the specific processorListener then starts the listener with executor.void
addListener
(ProcessorListener<ApiType> processorListener) addListener adds the specific processorListener, but not start it.void
distribute
(ProcessorListener.Notification<ApiType> obj, boolean isSync) distribute the object among listeners.void
run()
starts the processor listeners.boolean
void
stop()
-
Constructor Details
-
SharedProcessor
public SharedProcessor() -
SharedProcessor
-
SharedProcessor
-
-
Method Details
-
addAndStartListener
addAndStartListener first adds the specific processorListener then starts the listener with executor.- Parameters:
processorListener
- specific processor listener
-
addListener
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 among listeners.- Parameters:
obj
- specific objisSync
- is sync or not
-
shouldResync
public boolean shouldResync() -
stop
public void stop()
-