Class ProcessorListener<T>
- java.lang.Object
-
- io.fabric8.kubernetes.client.informers.impl.cache.ProcessorListener<T>
-
- Type Parameters:
T- type of ProcessorListener
public class ProcessorListener<T> extends Object
ProcessorListener implements Runnable interface. It's supposed to run in background and actually executes its event handler on notification. This has been taken from official client: https://github.com/kubernetes-client/java/blob/main/util/src/main/java/io/kubernetes/client/informer/cache/ProcessorListener.java which has been ported from official go client: https://github.com/kubernetes/client-go/blob/master/tools/cache/shared_informer.go#L570
Modified to execute loosely coupled from its processing thread
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProcessorListener.AddNotification<T>static classProcessorListener.DeleteNotification<T>static classProcessorListener.Notification<T>static classProcessorListener.UpdateNotification<T>
-
Constructor Summary
Constructors Constructor Description ProcessorListener(io.fabric8.kubernetes.client.informers.ResourceEventHandler<? super T> handler, long resyncPeriodInMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(ProcessorListener.Notification<T> notification)voiddetermineNextResync(ZonedDateTime now)io.fabric8.kubernetes.client.informers.ResourceEventHandler<? super T>getHandler()longgetResyncPeriodInMillis()booleanisReSync()booleanshouldResync(ZonedDateTime now)
-
-
-
Constructor Detail
-
ProcessorListener
public ProcessorListener(io.fabric8.kubernetes.client.informers.ResourceEventHandler<? super T> handler, long resyncPeriodInMillis)
-
-
Method Detail
-
add
public void add(ProcessorListener.Notification<T> notification)
-
determineNextResync
public void determineNextResync(ZonedDateTime now)
-
isReSync
public boolean isReSync()
-
shouldResync
public boolean shouldResync(ZonedDateTime now)
-
getResyncPeriodInMillis
public long getResyncPeriodInMillis()
-
getHandler
public io.fabric8.kubernetes.client.informers.ResourceEventHandler<? super T> getHandler()
-
-