Interface KubernetesSharedWatcher<T>
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
KubernetesConfigMapSharedWatcher
- All Known Implementing Classes:
KubernetesConfigMapSharedInformer,KubernetesSharedInformer
The interface for the Kubernetes shared watcher.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe Watch returned after creating watching, which can be used to close the watching. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the shared watcher without Exception.watch(String name, FlinkKubeClient.WatchCallbackHandler<T> callbackHandler, Executor executor) Watch the Kubernetes resource with specified name and do theFlinkKubeClient.WatchCallbackHandler.
-
Method Details
-
close
void close()Close the shared watcher without Exception.- Specified by:
closein interfaceAutoCloseable
-
watch
KubernetesSharedWatcher.Watch watch(String name, FlinkKubeClient.WatchCallbackHandler<T> callbackHandler, @Nullable Executor executor) Watch the Kubernetes resource with specified name and do theFlinkKubeClient.WatchCallbackHandler.- Parameters:
name- name to filter the resource to watchcallbackHandler- callbackHandler which reacts to resource eventsexecutor- to run callback- Returns:
- Return a watch for the Kubernetes resource. It needs to be closed after use.
-