Class Controller<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>>
- java.lang.Object
-
- io.fabric8.kubernetes.client.informers.cache.Controller<T,L>
-
public class Controller<T extends io.fabric8.kubernetes.api.model.HasMetadata,L extends io.fabric8.kubernetes.api.model.KubernetesResourceList<T>> extends Object
Controller is a generic controller framework. This is taken from https://github.com/kubernetes-client/java/blob/master/util/src/main/java/io/kubernetes/client/informer/cache/Controller.java which has been ported from official go client: https://github.com/kubernetes/client-go/blob/master/tools/cache/controller.go
-
-
Constructor Summary
Constructors Constructor Description Controller(Class<T> apiTypeClass, DeltaFIFO<T> queue, ListerWatcher<T,L> listerWatcher, Consumer<Deque<AbstractMap.SimpleEntry<DeltaFIFO.DeltaType,Object>>> processFunc, Supplier<Boolean> resyncFunc, long fullResyncPeriod, OperationContext context, ConcurrentLinkedQueue<SharedInformerEventListener> eventListeners)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasSynced()
Returns true if the queue has been resyncedString
lastSyncResourceVersion()
Returns the latest resource version watched by controller.void
run()
void
stop()
Stops the resync thread pool first, then stops the reflector.
-
-
-
Constructor Detail
-
Controller
public Controller(Class<T> apiTypeClass, DeltaFIFO<T> queue, ListerWatcher<T,L> listerWatcher, Consumer<Deque<AbstractMap.SimpleEntry<DeltaFIFO.DeltaType,Object>>> processFunc, Supplier<Boolean> resyncFunc, long fullResyncPeriod, OperationContext context, ConcurrentLinkedQueue<SharedInformerEventListener> eventListeners)
-
-
Method Detail
-
run
public void run()
-
stop
public void stop()
Stops the resync thread pool first, then stops the reflector.
-
hasSynced
public boolean hasSynced()
Returns true if the queue has been resynced- Returns:
- boolean value about queue sync status
-
lastSyncResourceVersion
public String lastSyncResourceVersion()
Returns the latest resource version watched by controller.- Returns:
- latest resource version
-
-