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()
int
void
run()
void
setReadyCheckInternal
(Duration readyCheckInternal) void
setReadyTimeout
(Duration readyTimeout) void
setWorkerCount
(int workerCount) void
setWorkerThreadPool
(ScheduledExecutorService workerThreadPool) void
shutdown()
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:Controller
Shutdown the controller.- Specified by:
shutdown
in interfaceController
-
getWorkQueue
-
getName
-
getWorkerCount
public int getWorkerCount() -
setWorkerCount
public void setWorkerCount(int workerCount) -
getWorkerThreadPool
-
setWorkerThreadPool
-
getReconciler
-
getReadyTimeout
-
setReadyTimeout
-
getReadyCheckInternal
-
setReadyCheckInternal
-