Package io.fabric8.kubernetes.client
Interface Watcher<T>
-
public interface Watcher<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classWatcher.Action
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voideventReceived(Watcher.Action action, T resource)Handle the given event.default voidonClose()Invoked when the watcher is gracefully closed.voidonClose(WatcherException cause)Invoked when the watcher closes due to an Exception.default booleanreconnecting()If the Watcher can reconnect itself after an error
-
-
-
Method Detail
-
reconnecting
default boolean reconnecting()
If the Watcher can reconnect itself after an errorCurrently only used to indicate if the Watch should ignore the watch reconnect limit
- Returns:
-
eventReceived
void eventReceived(Watcher.Action action, T resource)
Handle the given event.Should not be implemented with long-running logic as that may lead to memory issues.
-
onClose
default void onClose()
Invoked when the watcher is gracefully closed.
-
onClose
void onClose(WatcherException cause)
Invoked when the watcher closes due to an Exception.Should not be implemented with long-running logic as that may lead to memory issues.
- Parameters:
cause- What caused the watcher to be closed.
-
-