public enum WatchMode extends Enum<WatchMode>
Enum Constant and Description |
---|
stateChangeAndSuccess
The
CompletionStage <org.apache.zookeeper.WatchedEvent> will
complete for both successful trigger and connection exceptions. |
stateChangeOnly
The
CompletionStage <org.apache.zookeeper.WatchedEvent> will only
completeExceptionally. |
successOnly
The
CompletionStage <org.apache.zookeeper.WatchedEvent> will only
complete on successful trigger. |
Modifier and Type | Method and Description |
---|---|
static WatchMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WatchMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WatchMode successOnly
CompletionStage
<org.apache.zookeeper.WatchedEvent> will only
complete on successful trigger. i.e. connection issues are ignoredpublic static final WatchMode stateChangeOnly
CompletionStage
<org.apache.zookeeper.WatchedEvent> will only
completeExceptionally. Successful trigger is ignored. Connection exceptions are
of type: AsyncEventException
.public static final WatchMode stateChangeAndSuccess
CompletionStage
<org.apache.zookeeper.WatchedEvent> will
complete for both successful trigger and connection exceptions. Connection exceptions are
of type: AsyncEventException
. Note: this is the default
watch mode.public static WatchMode[] values()
for (WatchMode c : WatchMode.values()) System.out.println(c);
public static WatchMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.