Class DefaultControllerWatch<ApiType extends io.kubernetes.client.common.KubernetesObject>
java.lang.Object
io.kubernetes.client.extended.controller.DefaultControllerWatch<ApiType>
- Type Parameters:
ApiType
- the type parameter
- All Implemented Interfaces:
ControllerWatch<ApiType>
public class DefaultControllerWatch<ApiType extends io.kubernetes.client.common.KubernetesObject>
extends Object
implements ControllerWatch<ApiType>
An event handler plumbs work-queue into a controller.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the watching resource class.io.kubernetes.client.informer.ResourceEventHandler<ApiType>
Gets the event handler on watch events from the resource.Gets resync period for the registering event handler.void
setOnAddFilterPredicate
(Predicate<ApiType> onAddFilterPredicate) void
setOnDeleteFilterPredicate
(BiPredicate<ApiType, Boolean> onDeleteFilterPredicate) void
setOnUpdateFilterPredicate
(BiPredicate<ApiType, ApiType> onUpdateFilterPredicate)
-
Constructor Details
-
DefaultControllerWatch
public DefaultControllerWatch(Class<ApiType> apiTypeClass, WorkQueue<Request> workQueue, Function<ApiType, Request> workKeyGenerator, Duration resyncPeriod) Instantiates a new Work queue resource event handler.- Parameters:
workQueue
- the work queueworkKeyGenerator
- the work key generator
-
-
Method Details
-
getOnAddFilterPredicate
-
setOnAddFilterPredicate
-
getOnUpdateFilterPredicate
-
setOnUpdateFilterPredicate
-
getOnDeleteFilterPredicate
-
setOnDeleteFilterPredicate
-
getApiTypeClass
-
getResourceClass
Description copied from interface:ControllerWatch
Gets the watching resource class.- Specified by:
getResourceClass
in interfaceControllerWatch<ApiType extends io.kubernetes.client.common.KubernetesObject>
- Returns:
- the resouce class
-
getResourceEventHandler
Description copied from interface:ControllerWatch
Gets the event handler on watch events from the resource.- Specified by:
getResourceEventHandler
in interfaceControllerWatch<ApiType extends io.kubernetes.client.common.KubernetesObject>
- Returns:
- the resource event handler
-
getResyncPeriod
Description copied from interface:ControllerWatch
Gets resync period for the registering event handler.- Specified by:
getResyncPeriod
in interfaceControllerWatch<ApiType extends io.kubernetes.client.common.KubernetesObject>
- Returns:
- the resync period
-