public class DefaultControllerBuilder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
Controller |
build()
Build the controller.
|
<ApiType> DefaultControllerBuilder |
watch(java.util.function.Function<WorkQueue<Request>,ControllerWatch<ApiType>> controllerWatchGetter)
Starts building watches over resource.
|
DefaultControllerBuilder |
withName(java.lang.String controllerName)
Overrides name for the controller.
|
DefaultControllerBuilder |
withReadyFunc(java.util.function.Supplier<java.lang.Boolean> readyFunc)
Add a ready-function to the pre-flight check of the controller.
|
DefaultControllerBuilder |
withReconciler(Reconciler reconciler)
Sets reconciler of the controller.
|
DefaultControllerBuilder |
withWorkerCount(int workerCount)
Overrides worker thread counts of the controller.
|
DefaultControllerBuilder |
withWorkQueue(RateLimitingQueue<Request> workQueue)
Overrides workQueue for the controller.
|
public <ApiType> DefaultControllerBuilder watch(java.util.function.Function<WorkQueue<Request>,ControllerWatch<ApiType>> controllerWatchGetter)
ApiType
- the type parameter for the singular responsecontrollerWatchGetter
- the controller watch getterpublic DefaultControllerBuilder withName(java.lang.String controllerName)
controllerName
- the controller namepublic DefaultControllerBuilder withWorkQueue(RateLimitingQueue<Request> workQueue)
workQueue
- the work queuepublic DefaultControllerBuilder withReadyFunc(java.util.function.Supplier<java.lang.Boolean> readyFunc)
readyFunc
- the ready funcpublic DefaultControllerBuilder withWorkerCount(int workerCount)
workerCount
- the worker countpublic DefaultControllerBuilder withReconciler(Reconciler reconciler)
reconciler
- the reconcilerpublic Controller build() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- the illegal state exceptionCopyright © 2020. All rights reserved.