public class SharedProcessor<ApiType extends io.kubernetes.client.common.KubernetesObject> extends Object
Constructor and Description |
---|
SharedProcessor() |
SharedProcessor(ExecutorService threadPool) |
SharedProcessor(ExecutorService threadPool,
Duration timeout) |
Modifier and Type | Method and Description |
---|---|
void |
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 |
shouldResync() |
void |
stop() |
public SharedProcessor()
public SharedProcessor(ExecutorService threadPool)
public SharedProcessor(ExecutorService threadPool, Duration timeout)
public void addAndStartListener(ProcessorListener<ApiType> processorListener)
processorListener
- specific processor listenerpublic void addListener(ProcessorListener<ApiType> processorListener)
processorListener
- specific processor listenerpublic void run()
public void distribute(ProcessorListener.Notification<ApiType> obj, boolean isSync)
obj
- specific objisSync
- is sync or notpublic boolean shouldResync()
public void stop()
Copyright © 2020. All rights reserved.