Class DefaultController
java.lang.Object
io.kubernetes.client.extended.controller.DefaultController
- All Implemented Interfaces:
Controller,Runnable
The default implementation of a controller. A typical controller contains:
- a reconciler implemented by developers specifying what to do in reaction of notifications. see more documentation on the Reconciler interface - a work-queue continuously filled with task items managed by Informer framework - a set of worker threads acutally running reconciler.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultController(String name, Reconciler reconciler, RateLimitingQueue<Request> workQueue, io.prometheus.client.CollectorRegistry collectorRegistry, Supplier<Boolean>... readyFuncs) Instantiates a new Default controller.DefaultController(String name, Reconciler reconciler, RateLimitingQueue<Request> workQueue, Supplier<Boolean>... readyFuncs) Instantiates a new Default controller. -
Method Summary
Modifier and TypeMethodDescriptiongetName()intvoidrun()voidsetReadyCheckInternal(Duration readyCheckInternal) voidsetReadyTimeout(Duration readyTimeout) voidsetWorkerCount(int workerCount) voidsetWorkerThreadPool(ScheduledExecutorService workerThreadPool) voidshutdown()Shutdown the controller.
-
Constructor Details
-
DefaultController
public DefaultController(String name, Reconciler reconciler, RateLimitingQueue<Request> workQueue, Supplier<Boolean>... readyFuncs) Instantiates a new Default controller.- Parameters:
name- the namereconciler- the reconcilerworkQueue- the work queuereadyFuncs- the ready funcs
-
DefaultController
public DefaultController(String name, Reconciler reconciler, RateLimitingQueue<Request> workQueue, io.prometheus.client.CollectorRegistry collectorRegistry, Supplier<Boolean>... readyFuncs) Instantiates a new Default controller.- Parameters:
name- the namereconciler- the reconcilerworkQueue- the work queuecollectorRegistry- the collector registryreadyFuncs- the ready funcs
-
-
Method Details
-
run
public void run() -
shutdown
public void shutdown()Description copied from interface:ControllerShutdown the controller.- Specified by:
shutdownin interfaceController
-
getWorkQueue
-
getName
-
getWorkerCount
public int getWorkerCount() -
setWorkerCount
public void setWorkerCount(int workerCount) -
getWorkerThreadPool
-
setWorkerThreadPool
-
getReconciler
-
getReadyTimeout
-
setReadyTimeout
-
getReadyCheckInternal
-
setReadyCheckInternal
-