public class DefaultController extends Object implements Controller
- 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 and Description |
---|
DefaultController(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.
|
Modifier and Type | Method and Description |
---|---|
String |
getName() |
Duration |
getReadyCheckInternal() |
Duration |
getReadyTimeout() |
Reconciler |
getReconciler() |
int |
getWorkerCount() |
ExecutorService |
getWorkerThreadPool() |
RateLimitingQueue<Request> |
getWorkQueue() |
void |
run() |
void |
setReadyCheckInternal(Duration readyCheckInternal) |
void |
setReadyTimeout(Duration readyTimeout) |
void |
setWorkerCount(int workerCount) |
void |
setWorkerThreadPool(ScheduledExecutorService workerThreadPool) |
void |
shutdown()
Shutdown the controller.
|
public DefaultController(String name, Reconciler reconciler, RateLimitingQueue<Request> workQueue, Supplier<Boolean>... readyFuncs)
name
- the namereconciler
- the reconcilerworkQueue
- the work queuereadyFuncs
- the ready funcspublic DefaultController(String name, Reconciler reconciler, RateLimitingQueue<Request> workQueue, io.prometheus.client.CollectorRegistry collectorRegistry, Supplier<Boolean>... readyFuncs)
name
- the namereconciler
- the reconcilerworkQueue
- the work queuecollectorRegistry
- the collector registryreadyFuncs
- the ready funcspublic void shutdown()
Controller
shutdown
in interface Controller
public RateLimitingQueue<Request> getWorkQueue()
public String getName()
public int getWorkerCount()
public void setWorkerCount(int workerCount)
public ExecutorService getWorkerThreadPool()
public void setWorkerThreadPool(ScheduledExecutorService workerThreadPool)
public Reconciler getReconciler()
public Duration getReadyTimeout()
public void setReadyTimeout(Duration readyTimeout)
public Duration getReadyCheckInternal()
public void setReadyCheckInternal(Duration readyCheckInternal)
Copyright © 2023. All rights reserved.