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
Modifier and Type Method Description booleanhasSynced()Returns true if the queue has been resyncedStringlastSyncResourceVersion()Returns the latest resource version watched by controller.voidrun()voidstop()Stops the resync thread pool first, then stops the reflector.
-
Constructor Details
-
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 Details
-
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
Returns the latest resource version watched by controller.- Returns:
- latest resource version
-