|
@@ -1,4 +1,4 @@
|
|
-/**
|
|
|
|
|
|
+/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
* or more contributor license agreements. See the NOTICE file
|
|
* or more contributor license agreements. See the NOTICE file
|
|
* distributed with this work for additional information
|
|
* distributed with this work for additional information
|
|
@@ -18,17 +18,17 @@
|
|
|
|
|
|
package org.apache.zookeeper;
|
|
package org.apache.zookeeper;
|
|
|
|
|
|
-import org.apache.yetus.audience.InterfaceAudience;
|
|
|
|
-
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.EnumSet;
|
|
import java.util.EnumSet;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
+import org.apache.yetus.audience.InterfaceAudience;
|
|
|
|
|
|
@SuppressWarnings("serial")
|
|
@SuppressWarnings("serial")
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public abstract class KeeperException extends Exception {
|
|
public abstract class KeeperException extends Exception {
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* All multi-requests that result in an exception retain the results
|
|
* All multi-requests that result in an exception retain the results
|
|
* here so that it is possible to examine the problems in the catch
|
|
* here so that it is possible to examine the problems in the catch
|
|
@@ -92,65 +92,65 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
public static KeeperException create(Code code) {
|
|
public static KeeperException create(Code code) {
|
|
switch (code) {
|
|
switch (code) {
|
|
- case SYSTEMERROR:
|
|
|
|
- return new SystemErrorException();
|
|
|
|
- case RUNTIMEINCONSISTENCY:
|
|
|
|
- return new RuntimeInconsistencyException();
|
|
|
|
- case DATAINCONSISTENCY:
|
|
|
|
- return new DataInconsistencyException();
|
|
|
|
- case CONNECTIONLOSS:
|
|
|
|
- return new ConnectionLossException();
|
|
|
|
- case MARSHALLINGERROR:
|
|
|
|
- return new MarshallingErrorException();
|
|
|
|
- case UNIMPLEMENTED:
|
|
|
|
- return new UnimplementedException();
|
|
|
|
- case OPERATIONTIMEOUT:
|
|
|
|
- return new OperationTimeoutException();
|
|
|
|
- case NEWCONFIGNOQUORUM:
|
|
|
|
- return new NewConfigNoQuorum();
|
|
|
|
- case RECONFIGINPROGRESS:
|
|
|
|
- return new ReconfigInProgress();
|
|
|
|
- case BADARGUMENTS:
|
|
|
|
- return new BadArgumentsException();
|
|
|
|
- case APIERROR:
|
|
|
|
- return new APIErrorException();
|
|
|
|
- case NONODE:
|
|
|
|
- return new NoNodeException();
|
|
|
|
- case NOAUTH:
|
|
|
|
- return new NoAuthException();
|
|
|
|
- case BADVERSION:
|
|
|
|
- return new BadVersionException();
|
|
|
|
- case NOCHILDRENFOREPHEMERALS:
|
|
|
|
- return new NoChildrenForEphemeralsException();
|
|
|
|
- case NODEEXISTS:
|
|
|
|
- return new NodeExistsException();
|
|
|
|
- case INVALIDACL:
|
|
|
|
- return new InvalidACLException();
|
|
|
|
- case AUTHFAILED:
|
|
|
|
- return new AuthFailedException();
|
|
|
|
- case NOTEMPTY:
|
|
|
|
- return new NotEmptyException();
|
|
|
|
- case SESSIONEXPIRED:
|
|
|
|
- return new SessionExpiredException();
|
|
|
|
- case INVALIDCALLBACK:
|
|
|
|
- return new InvalidCallbackException();
|
|
|
|
- case SESSIONMOVED:
|
|
|
|
- return new SessionMovedException();
|
|
|
|
- case NOTREADONLY:
|
|
|
|
- return new NotReadOnlyException();
|
|
|
|
- case EPHEMERALONLOCALSESSION:
|
|
|
|
- return new EphemeralOnLocalSessionException();
|
|
|
|
- case NOWATCHER:
|
|
|
|
- return new NoWatcherException();
|
|
|
|
- case RECONFIGDISABLED:
|
|
|
|
- return new ReconfigDisabledException();
|
|
|
|
- case SESSIONCLOSEDREQUIRESASLAUTH:
|
|
|
|
- return new SessionClosedRequireAuthException();
|
|
|
|
- case REQUESTTIMEOUT:
|
|
|
|
- return new RequestTimeoutException();
|
|
|
|
- case OK:
|
|
|
|
- default:
|
|
|
|
- throw new IllegalArgumentException("Invalid exception code");
|
|
|
|
|
|
+ case SYSTEMERROR:
|
|
|
|
+ return new SystemErrorException();
|
|
|
|
+ case RUNTIMEINCONSISTENCY:
|
|
|
|
+ return new RuntimeInconsistencyException();
|
|
|
|
+ case DATAINCONSISTENCY:
|
|
|
|
+ return new DataInconsistencyException();
|
|
|
|
+ case CONNECTIONLOSS:
|
|
|
|
+ return new ConnectionLossException();
|
|
|
|
+ case MARSHALLINGERROR:
|
|
|
|
+ return new MarshallingErrorException();
|
|
|
|
+ case UNIMPLEMENTED:
|
|
|
|
+ return new UnimplementedException();
|
|
|
|
+ case OPERATIONTIMEOUT:
|
|
|
|
+ return new OperationTimeoutException();
|
|
|
|
+ case NEWCONFIGNOQUORUM:
|
|
|
|
+ return new NewConfigNoQuorum();
|
|
|
|
+ case RECONFIGINPROGRESS:
|
|
|
|
+ return new ReconfigInProgress();
|
|
|
|
+ case BADARGUMENTS:
|
|
|
|
+ return new BadArgumentsException();
|
|
|
|
+ case APIERROR:
|
|
|
|
+ return new APIErrorException();
|
|
|
|
+ case NONODE:
|
|
|
|
+ return new NoNodeException();
|
|
|
|
+ case NOAUTH:
|
|
|
|
+ return new NoAuthException();
|
|
|
|
+ case BADVERSION:
|
|
|
|
+ return new BadVersionException();
|
|
|
|
+ case NOCHILDRENFOREPHEMERALS:
|
|
|
|
+ return new NoChildrenForEphemeralsException();
|
|
|
|
+ case NODEEXISTS:
|
|
|
|
+ return new NodeExistsException();
|
|
|
|
+ case INVALIDACL:
|
|
|
|
+ return new InvalidACLException();
|
|
|
|
+ case AUTHFAILED:
|
|
|
|
+ return new AuthFailedException();
|
|
|
|
+ case NOTEMPTY:
|
|
|
|
+ return new NotEmptyException();
|
|
|
|
+ case SESSIONEXPIRED:
|
|
|
|
+ return new SessionExpiredException();
|
|
|
|
+ case INVALIDCALLBACK:
|
|
|
|
+ return new InvalidCallbackException();
|
|
|
|
+ case SESSIONMOVED:
|
|
|
|
+ return new SessionMovedException();
|
|
|
|
+ case NOTREADONLY:
|
|
|
|
+ return new NotReadOnlyException();
|
|
|
|
+ case EPHEMERALONLOCALSESSION:
|
|
|
|
+ return new EphemeralOnLocalSessionException();
|
|
|
|
+ case NOWATCHER:
|
|
|
|
+ return new NoWatcherException();
|
|
|
|
+ case RECONFIGDISABLED:
|
|
|
|
+ return new ReconfigDisabledException();
|
|
|
|
+ case SESSIONCLOSEDREQUIRESASLAUTH:
|
|
|
|
+ return new SessionClosedRequireAuthException();
|
|
|
|
+ case REQUESTTIMEOUT:
|
|
|
|
+ return new RequestTimeoutException();
|
|
|
|
+ case OK:
|
|
|
|
+ default:
|
|
|
|
+ throw new IllegalArgumentException("Invalid exception code");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -181,142 +181,143 @@ public abstract class KeeperException extends Exception {
|
|
@Deprecated
|
|
@Deprecated
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public interface CodeDeprecated {
|
|
public interface CodeDeprecated {
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#OK} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#OK} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int Ok = 0;
|
|
|
|
|
|
+ int Ok = 0;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#SYSTEMERROR} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#SYSTEMERROR} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int SystemError = -1;
|
|
|
|
|
|
+ int SystemError = -1;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use
|
|
* @deprecated deprecated in 3.1.0, use
|
|
* {@link Code#RUNTIMEINCONSISTENCY} instead
|
|
* {@link Code#RUNTIMEINCONSISTENCY} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int RuntimeInconsistency = -2;
|
|
|
|
|
|
+ int RuntimeInconsistency = -2;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#DATAINCONSISTENCY}
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#DATAINCONSISTENCY}
|
|
* instead
|
|
* instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int DataInconsistency = -3;
|
|
|
|
|
|
+ int DataInconsistency = -3;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#CONNECTIONLOSS}
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#CONNECTIONLOSS}
|
|
* instead
|
|
* instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int ConnectionLoss = -4;
|
|
|
|
|
|
+ int ConnectionLoss = -4;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#MARSHALLINGERROR}
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#MARSHALLINGERROR}
|
|
* instead
|
|
* instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int MarshallingError = -5;
|
|
|
|
|
|
+ int MarshallingError = -5;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#UNIMPLEMENTED}
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#UNIMPLEMENTED}
|
|
* instead
|
|
* instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int Unimplemented = -6;
|
|
|
|
|
|
+ int Unimplemented = -6;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#OPERATIONTIMEOUT}
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#OPERATIONTIMEOUT}
|
|
* instead
|
|
* instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int OperationTimeout = -7;
|
|
|
|
|
|
+ int OperationTimeout = -7;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#BADARGUMENTS}
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#BADARGUMENTS}
|
|
* instead
|
|
* instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int BadArguments = -8;
|
|
|
|
|
|
+ int BadArguments = -8;
|
|
|
|
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int UnknownSession= -12;
|
|
|
|
|
|
+ int UnknownSession = -12;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#NEWCONFIGNOQUORUM}
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#NEWCONFIGNOQUORUM}
|
|
* instead
|
|
* instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int NewConfigNoQuorum = -13;
|
|
|
|
|
|
+ int NewConfigNoQuorum = -13;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#RECONFIGINPROGRESS}
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#RECONFIGINPROGRESS}
|
|
* instead
|
|
* instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int ReconfigInProgress= -14;
|
|
|
|
|
|
+ int ReconfigInProgress = -14;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#APIERROR} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#APIERROR} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int APIError = -100;
|
|
|
|
|
|
+ int APIError = -100;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#NONODE} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#NONODE} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int NoNode = -101;
|
|
|
|
|
|
+ int NoNode = -101;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#NOAUTH} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#NOAUTH} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int NoAuth = -102;
|
|
|
|
|
|
+ int NoAuth = -102;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#BADVERSION} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#BADVERSION} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int BadVersion = -103;
|
|
|
|
|
|
+ int BadVersion = -103;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use
|
|
* @deprecated deprecated in 3.1.0, use
|
|
* {@link Code#NOCHILDRENFOREPHEMERALS}
|
|
* {@link Code#NOCHILDRENFOREPHEMERALS}
|
|
* instead
|
|
* instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int NoChildrenForEphemerals = -108;
|
|
|
|
|
|
+ int NoChildrenForEphemerals = -108;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#NODEEXISTS} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#NODEEXISTS} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int NodeExists = -110;
|
|
|
|
|
|
+ int NodeExists = -110;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#NOTEMPTY} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#NOTEMPTY} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int NotEmpty = -111;
|
|
|
|
|
|
+ int NotEmpty = -111;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#SESSIONEXPIRED} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#SESSIONEXPIRED} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int SessionExpired = -112;
|
|
|
|
|
|
+ int SessionExpired = -112;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#INVALIDCALLBACK}
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#INVALIDCALLBACK}
|
|
* instead
|
|
* instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int InvalidCallback = -113;
|
|
|
|
|
|
+ int InvalidCallback = -113;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#INVALIDACL} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#INVALIDACL} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int InvalidACL = -114;
|
|
|
|
|
|
+ int InvalidACL = -114;
|
|
/**
|
|
/**
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#AUTHFAILED} instead
|
|
* @deprecated deprecated in 3.1.0, use {@link Code#AUTHFAILED} instead
|
|
*/
|
|
*/
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int AuthFailed = -115;
|
|
|
|
-
|
|
|
|
|
|
+ int AuthFailed = -115;
|
|
|
|
+
|
|
// This value will be used directly in {@link CODE#SESSIONMOVED}
|
|
// This value will be used directly in {@link CODE#SESSIONMOVED}
|
|
- // public static final int SessionMoved = -118;
|
|
|
|
-
|
|
|
|
|
|
+ // public static final int SessionMoved = -118;
|
|
|
|
+
|
|
@Deprecated
|
|
@Deprecated
|
|
- public static final int EphemeralOnLocalSession = -120;
|
|
|
|
|
|
+ int EphemeralOnLocalSession = -120;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -326,78 +327,78 @@ public abstract class KeeperException extends Exception {
|
|
* enum values are in all CAPS.
|
|
* enum values are in all CAPS.
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
- public static enum Code implements CodeDeprecated {
|
|
|
|
|
|
+ public enum Code implements CodeDeprecated {
|
|
/** Everything is OK */
|
|
/** Everything is OK */
|
|
- OK (Ok),
|
|
|
|
|
|
+ OK(Ok),
|
|
|
|
|
|
/** System and server-side errors.
|
|
/** System and server-side errors.
|
|
* This is never thrown by the server, it shouldn't be used other than
|
|
* This is never thrown by the server, it shouldn't be used other than
|
|
* to indicate a range. Specifically error codes greater than this
|
|
* to indicate a range. Specifically error codes greater than this
|
|
* value, but lesser than {@link #APIERROR}, are system errors.
|
|
* value, but lesser than {@link #APIERROR}, are system errors.
|
|
*/
|
|
*/
|
|
- SYSTEMERROR (SystemError),
|
|
|
|
|
|
+ SYSTEMERROR(SystemError),
|
|
|
|
|
|
/** A runtime inconsistency was found */
|
|
/** A runtime inconsistency was found */
|
|
- RUNTIMEINCONSISTENCY (RuntimeInconsistency),
|
|
|
|
|
|
+ RUNTIMEINCONSISTENCY(RuntimeInconsistency),
|
|
/** A data inconsistency was found */
|
|
/** A data inconsistency was found */
|
|
- DATAINCONSISTENCY (DataInconsistency),
|
|
|
|
|
|
+ DATAINCONSISTENCY(DataInconsistency),
|
|
/** Connection to the server has been lost */
|
|
/** Connection to the server has been lost */
|
|
- CONNECTIONLOSS (ConnectionLoss),
|
|
|
|
|
|
+ CONNECTIONLOSS(ConnectionLoss),
|
|
/** Error while marshalling or unmarshalling data */
|
|
/** Error while marshalling or unmarshalling data */
|
|
- MARSHALLINGERROR (MarshallingError),
|
|
|
|
|
|
+ MARSHALLINGERROR(MarshallingError),
|
|
/** Operation is unimplemented */
|
|
/** Operation is unimplemented */
|
|
- UNIMPLEMENTED (Unimplemented),
|
|
|
|
|
|
+ UNIMPLEMENTED(Unimplemented),
|
|
/** Operation timeout */
|
|
/** Operation timeout */
|
|
- OPERATIONTIMEOUT (OperationTimeout),
|
|
|
|
|
|
+ OPERATIONTIMEOUT(OperationTimeout),
|
|
/** Invalid arguments */
|
|
/** Invalid arguments */
|
|
- BADARGUMENTS (BadArguments),
|
|
|
|
- /** No quorum of new config is connected and up-to-date with the leader of last commmitted config - try
|
|
|
|
|
|
+ BADARGUMENTS(BadArguments),
|
|
|
|
+ /** No quorum of new config is connected and up-to-date with the leader of last commmitted config - try
|
|
* invoking reconfiguration after new servers are connected and synced */
|
|
* invoking reconfiguration after new servers are connected and synced */
|
|
- NEWCONFIGNOQUORUM (NewConfigNoQuorum),
|
|
|
|
|
|
+ NEWCONFIGNOQUORUM(NewConfigNoQuorum),
|
|
/** Another reconfiguration is in progress -- concurrent reconfigs not supported (yet) */
|
|
/** Another reconfiguration is in progress -- concurrent reconfigs not supported (yet) */
|
|
- RECONFIGINPROGRESS (ReconfigInProgress),
|
|
|
|
|
|
+ RECONFIGINPROGRESS(ReconfigInProgress),
|
|
/** Unknown session (internal server use only) */
|
|
/** Unknown session (internal server use only) */
|
|
- UNKNOWNSESSION (UnknownSession),
|
|
|
|
-
|
|
|
|
|
|
+ UNKNOWNSESSION(UnknownSession),
|
|
|
|
+
|
|
/** API errors.
|
|
/** API errors.
|
|
* This is never thrown by the server, it shouldn't be used other than
|
|
* This is never thrown by the server, it shouldn't be used other than
|
|
* to indicate a range. Specifically error codes greater than this
|
|
* to indicate a range. Specifically error codes greater than this
|
|
* value are API errors (while values less than this indicate a
|
|
* value are API errors (while values less than this indicate a
|
|
* {@link #SYSTEMERROR}).
|
|
* {@link #SYSTEMERROR}).
|
|
*/
|
|
*/
|
|
- APIERROR (APIError),
|
|
|
|
|
|
+ APIERROR(APIError),
|
|
|
|
|
|
/** Node does not exist */
|
|
/** Node does not exist */
|
|
- NONODE (NoNode),
|
|
|
|
|
|
+ NONODE(NoNode),
|
|
/** Not authenticated */
|
|
/** Not authenticated */
|
|
- NOAUTH (NoAuth),
|
|
|
|
|
|
+ NOAUTH(NoAuth),
|
|
/** Version conflict
|
|
/** Version conflict
|
|
- In case of reconfiguration: reconfig requested from config version X but last seen config has a different version Y */
|
|
|
|
- BADVERSION (BadVersion),
|
|
|
|
|
|
+ In case of reconfiguration: reconfig requested from config version X but last seen config has a different version Y */
|
|
|
|
+ BADVERSION(BadVersion),
|
|
/** Ephemeral nodes may not have children */
|
|
/** Ephemeral nodes may not have children */
|
|
- NOCHILDRENFOREPHEMERALS (NoChildrenForEphemerals),
|
|
|
|
|
|
+ NOCHILDRENFOREPHEMERALS(NoChildrenForEphemerals),
|
|
/** The node already exists */
|
|
/** The node already exists */
|
|
- NODEEXISTS (NodeExists),
|
|
|
|
|
|
+ NODEEXISTS(NodeExists),
|
|
/** The node has children */
|
|
/** The node has children */
|
|
- NOTEMPTY (NotEmpty),
|
|
|
|
|
|
+ NOTEMPTY(NotEmpty),
|
|
/** The session has been expired by the server */
|
|
/** The session has been expired by the server */
|
|
- SESSIONEXPIRED (SessionExpired),
|
|
|
|
|
|
+ SESSIONEXPIRED(SessionExpired),
|
|
/** Invalid callback specified */
|
|
/** Invalid callback specified */
|
|
- INVALIDCALLBACK (InvalidCallback),
|
|
|
|
|
|
+ INVALIDCALLBACK(InvalidCallback),
|
|
/** Invalid ACL specified */
|
|
/** Invalid ACL specified */
|
|
- INVALIDACL (InvalidACL),
|
|
|
|
|
|
+ INVALIDACL(InvalidACL),
|
|
/** Client authentication failed */
|
|
/** Client authentication failed */
|
|
- AUTHFAILED (AuthFailed),
|
|
|
|
|
|
+ AUTHFAILED(AuthFailed),
|
|
/** Session moved to another server, so operation is ignored */
|
|
/** Session moved to another server, so operation is ignored */
|
|
- SESSIONMOVED (-118),
|
|
|
|
|
|
+ SESSIONMOVED(-118),
|
|
/** State-changing request is passed to read-only server */
|
|
/** State-changing request is passed to read-only server */
|
|
- NOTREADONLY (-119),
|
|
|
|
|
|
+ NOTREADONLY(-119),
|
|
/** Attempt to create ephemeral node on a local session */
|
|
/** Attempt to create ephemeral node on a local session */
|
|
- EPHEMERALONLOCALSESSION (EphemeralOnLocalSession),
|
|
|
|
|
|
+ EPHEMERALONLOCALSESSION(EphemeralOnLocalSession),
|
|
/** Attempts to remove a non-existing watcher */
|
|
/** Attempts to remove a non-existing watcher */
|
|
- NOWATCHER (-121),
|
|
|
|
|
|
+ NOWATCHER(-121),
|
|
/** Request not completed within max allowed time.*/
|
|
/** Request not completed within max allowed time.*/
|
|
- REQUESTTIMEOUT (-122),
|
|
|
|
|
|
+ REQUESTTIMEOUT(-122),
|
|
/** Attempts to perform a reconfiguration operation when reconfiguration feature is disabled. */
|
|
/** Attempts to perform a reconfiguration operation when reconfiguration feature is disabled. */
|
|
RECONFIGDISABLED(-123),
|
|
RECONFIGDISABLED(-123),
|
|
/** The session has been closed by server because server requires client to do SASL authentication,
|
|
/** The session has been closed by server because server requires client to do SASL authentication,
|
|
@@ -405,12 +406,12 @@ public abstract class KeeperException extends Exception {
|
|
* (i.e. wrong credential used.). */
|
|
* (i.e. wrong credential used.). */
|
|
SESSIONCLOSEDREQUIRESASLAUTH(-124);
|
|
SESSIONCLOSEDREQUIRESASLAUTH(-124);
|
|
|
|
|
|
- private static final Map<Integer,Code> lookup
|
|
|
|
- = new HashMap<Integer,Code>();
|
|
|
|
|
|
+ private static final Map<Integer, Code> lookup = new HashMap<Integer, Code>();
|
|
|
|
|
|
static {
|
|
static {
|
|
- for(Code c : EnumSet.allOf(Code.class))
|
|
|
|
|
|
+ for (Code c : EnumSet.allOf(Code.class)) {
|
|
lookup.put(c.code, c);
|
|
lookup.put(c.code, c);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
private final int code;
|
|
private final int code;
|
|
@@ -422,7 +423,9 @@ public abstract class KeeperException extends Exception {
|
|
* Get the int value for a particular Code.
|
|
* Get the int value for a particular Code.
|
|
* @return error code as integer
|
|
* @return error code as integer
|
|
*/
|
|
*/
|
|
- public int intValue() { return code; }
|
|
|
|
|
|
+ public int intValue() {
|
|
|
|
+ return code;
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* Get the Code value for a particular integer error code
|
|
* Get the Code value for a particular integer error code
|
|
@@ -436,64 +439,64 @@ public abstract class KeeperException extends Exception {
|
|
|
|
|
|
static String getCodeMessage(Code code) {
|
|
static String getCodeMessage(Code code) {
|
|
switch (code) {
|
|
switch (code) {
|
|
- case OK:
|
|
|
|
- return "ok";
|
|
|
|
- case SYSTEMERROR:
|
|
|
|
- return "SystemError";
|
|
|
|
- case RUNTIMEINCONSISTENCY:
|
|
|
|
- return "RuntimeInconsistency";
|
|
|
|
- case DATAINCONSISTENCY:
|
|
|
|
- return "DataInconsistency";
|
|
|
|
- case CONNECTIONLOSS:
|
|
|
|
- return "ConnectionLoss";
|
|
|
|
- case MARSHALLINGERROR:
|
|
|
|
- return "MarshallingError";
|
|
|
|
- case NEWCONFIGNOQUORUM:
|
|
|
|
- return "NewConfigNoQuorum";
|
|
|
|
- case RECONFIGINPROGRESS:
|
|
|
|
- return "ReconfigInProgress";
|
|
|
|
- case UNIMPLEMENTED:
|
|
|
|
- return "Unimplemented";
|
|
|
|
- case OPERATIONTIMEOUT:
|
|
|
|
- return "OperationTimeout";
|
|
|
|
- case BADARGUMENTS:
|
|
|
|
- return "BadArguments";
|
|
|
|
- case APIERROR:
|
|
|
|
- return "APIError";
|
|
|
|
- case NONODE:
|
|
|
|
- return "NoNode";
|
|
|
|
- case NOAUTH:
|
|
|
|
- return "NoAuth";
|
|
|
|
- case BADVERSION:
|
|
|
|
- return "BadVersion";
|
|
|
|
- case NOCHILDRENFOREPHEMERALS:
|
|
|
|
- return "NoChildrenForEphemerals";
|
|
|
|
- case NODEEXISTS:
|
|
|
|
- return "NodeExists";
|
|
|
|
- case INVALIDACL:
|
|
|
|
- return "InvalidACL";
|
|
|
|
- case AUTHFAILED:
|
|
|
|
- return "AuthFailed";
|
|
|
|
- case NOTEMPTY:
|
|
|
|
- return "Directory not empty";
|
|
|
|
- case SESSIONEXPIRED:
|
|
|
|
- return "Session expired";
|
|
|
|
- case INVALIDCALLBACK:
|
|
|
|
- return "Invalid callback";
|
|
|
|
- case SESSIONMOVED:
|
|
|
|
- return "Session moved";
|
|
|
|
- case NOTREADONLY:
|
|
|
|
- return "Not a read-only call";
|
|
|
|
- case EPHEMERALONLOCALSESSION:
|
|
|
|
- return "Ephemeral node on local session";
|
|
|
|
- case NOWATCHER:
|
|
|
|
- return "No such watcher";
|
|
|
|
- case RECONFIGDISABLED:
|
|
|
|
- return "Reconfig is disabled";
|
|
|
|
- case SESSIONCLOSEDREQUIRESASLAUTH:
|
|
|
|
- return "Session closed because client failed to authenticate";
|
|
|
|
- default:
|
|
|
|
- return "Unknown error " + code;
|
|
|
|
|
|
+ case OK:
|
|
|
|
+ return "ok";
|
|
|
|
+ case SYSTEMERROR:
|
|
|
|
+ return "SystemError";
|
|
|
|
+ case RUNTIMEINCONSISTENCY:
|
|
|
|
+ return "RuntimeInconsistency";
|
|
|
|
+ case DATAINCONSISTENCY:
|
|
|
|
+ return "DataInconsistency";
|
|
|
|
+ case CONNECTIONLOSS:
|
|
|
|
+ return "ConnectionLoss";
|
|
|
|
+ case MARSHALLINGERROR:
|
|
|
|
+ return "MarshallingError";
|
|
|
|
+ case NEWCONFIGNOQUORUM:
|
|
|
|
+ return "NewConfigNoQuorum";
|
|
|
|
+ case RECONFIGINPROGRESS:
|
|
|
|
+ return "ReconfigInProgress";
|
|
|
|
+ case UNIMPLEMENTED:
|
|
|
|
+ return "Unimplemented";
|
|
|
|
+ case OPERATIONTIMEOUT:
|
|
|
|
+ return "OperationTimeout";
|
|
|
|
+ case BADARGUMENTS:
|
|
|
|
+ return "BadArguments";
|
|
|
|
+ case APIERROR:
|
|
|
|
+ return "APIError";
|
|
|
|
+ case NONODE:
|
|
|
|
+ return "NoNode";
|
|
|
|
+ case NOAUTH:
|
|
|
|
+ return "NoAuth";
|
|
|
|
+ case BADVERSION:
|
|
|
|
+ return "BadVersion";
|
|
|
|
+ case NOCHILDRENFOREPHEMERALS:
|
|
|
|
+ return "NoChildrenForEphemerals";
|
|
|
|
+ case NODEEXISTS:
|
|
|
|
+ return "NodeExists";
|
|
|
|
+ case INVALIDACL:
|
|
|
|
+ return "InvalidACL";
|
|
|
|
+ case AUTHFAILED:
|
|
|
|
+ return "AuthFailed";
|
|
|
|
+ case NOTEMPTY:
|
|
|
|
+ return "Directory not empty";
|
|
|
|
+ case SESSIONEXPIRED:
|
|
|
|
+ return "Session expired";
|
|
|
|
+ case INVALIDCALLBACK:
|
|
|
|
+ return "Invalid callback";
|
|
|
|
+ case SESSIONMOVED:
|
|
|
|
+ return "Session moved";
|
|
|
|
+ case NOTREADONLY:
|
|
|
|
+ return "Not a read-only call";
|
|
|
|
+ case EPHEMERALONLOCALSESSION:
|
|
|
|
+ return "Ephemeral node on local session";
|
|
|
|
+ case NOWATCHER:
|
|
|
|
+ return "No such watcher";
|
|
|
|
+ case RECONFIGDISABLED:
|
|
|
|
+ return "Reconfig is disabled";
|
|
|
|
+ case SESSIONCLOSEDREQUIRESASLAUTH:
|
|
|
|
+ return "Session closed because client failed to authenticate";
|
|
|
|
+ default:
|
|
|
|
+ return "Unknown error " + code;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -565,9 +568,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class APIErrorException extends KeeperException {
|
|
public static class APIErrorException extends KeeperException {
|
|
|
|
+
|
|
public APIErrorException() {
|
|
public APIErrorException() {
|
|
super(Code.APIERROR);
|
|
super(Code.APIERROR);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -575,9 +580,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class AuthFailedException extends KeeperException {
|
|
public static class AuthFailedException extends KeeperException {
|
|
|
|
+
|
|
public AuthFailedException() {
|
|
public AuthFailedException() {
|
|
super(Code.AUTHFAILED);
|
|
super(Code.AUTHFAILED);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -585,12 +592,14 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class BadArgumentsException extends KeeperException {
|
|
public static class BadArgumentsException extends KeeperException {
|
|
|
|
+
|
|
public BadArgumentsException() {
|
|
public BadArgumentsException() {
|
|
super(Code.BADARGUMENTS);
|
|
super(Code.BADARGUMENTS);
|
|
}
|
|
}
|
|
public BadArgumentsException(String path) {
|
|
public BadArgumentsException(String path) {
|
|
super(Code.BADARGUMENTS, path);
|
|
super(Code.BADARGUMENTS, path);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -598,12 +607,14 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class BadVersionException extends KeeperException {
|
|
public static class BadVersionException extends KeeperException {
|
|
|
|
+
|
|
public BadVersionException() {
|
|
public BadVersionException() {
|
|
super(Code.BADVERSION);
|
|
super(Code.BADVERSION);
|
|
}
|
|
}
|
|
public BadVersionException(String path) {
|
|
public BadVersionException(String path) {
|
|
super(Code.BADVERSION, path);
|
|
super(Code.BADVERSION, path);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -611,9 +622,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class ConnectionLossException extends KeeperException {
|
|
public static class ConnectionLossException extends KeeperException {
|
|
|
|
+
|
|
public ConnectionLossException() {
|
|
public ConnectionLossException() {
|
|
super(Code.CONNECTIONLOSS);
|
|
super(Code.CONNECTIONLOSS);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -621,9 +634,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class DataInconsistencyException extends KeeperException {
|
|
public static class DataInconsistencyException extends KeeperException {
|
|
|
|
+
|
|
public DataInconsistencyException() {
|
|
public DataInconsistencyException() {
|
|
super(Code.DATAINCONSISTENCY);
|
|
super(Code.DATAINCONSISTENCY);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -631,12 +646,14 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class InvalidACLException extends KeeperException {
|
|
public static class InvalidACLException extends KeeperException {
|
|
|
|
+
|
|
public InvalidACLException() {
|
|
public InvalidACLException() {
|
|
super(Code.INVALIDACL);
|
|
super(Code.INVALIDACL);
|
|
}
|
|
}
|
|
public InvalidACLException(String path) {
|
|
public InvalidACLException(String path) {
|
|
super(Code.INVALIDACL, path);
|
|
super(Code.INVALIDACL, path);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -644,9 +661,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class InvalidCallbackException extends KeeperException {
|
|
public static class InvalidCallbackException extends KeeperException {
|
|
|
|
+
|
|
public InvalidCallbackException() {
|
|
public InvalidCallbackException() {
|
|
super(Code.INVALIDCALLBACK);
|
|
super(Code.INVALIDCALLBACK);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -654,9 +673,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class MarshallingErrorException extends KeeperException {
|
|
public static class MarshallingErrorException extends KeeperException {
|
|
|
|
+
|
|
public MarshallingErrorException() {
|
|
public MarshallingErrorException() {
|
|
super(Code.MARSHALLINGERROR);
|
|
super(Code.MARSHALLINGERROR);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -664,9 +685,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class NoAuthException extends KeeperException {
|
|
public static class NoAuthException extends KeeperException {
|
|
|
|
+
|
|
public NoAuthException() {
|
|
public NoAuthException() {
|
|
super(Code.NOAUTH);
|
|
super(Code.NOAUTH);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -674,32 +697,38 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class NewConfigNoQuorum extends KeeperException {
|
|
public static class NewConfigNoQuorum extends KeeperException {
|
|
|
|
+
|
|
public NewConfigNoQuorum() {
|
|
public NewConfigNoQuorum() {
|
|
super(Code.NEWCONFIGNOQUORUM);
|
|
super(Code.NEWCONFIGNOQUORUM);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @see Code#RECONFIGINPROGRESS
|
|
* @see Code#RECONFIGINPROGRESS
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class ReconfigInProgress extends KeeperException {
|
|
public static class ReconfigInProgress extends KeeperException {
|
|
|
|
+
|
|
public ReconfigInProgress() {
|
|
public ReconfigInProgress() {
|
|
super(Code.RECONFIGINPROGRESS);
|
|
super(Code.RECONFIGINPROGRESS);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @see Code#NOCHILDRENFOREPHEMERALS
|
|
* @see Code#NOCHILDRENFOREPHEMERALS
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class NoChildrenForEphemeralsException extends KeeperException {
|
|
public static class NoChildrenForEphemeralsException extends KeeperException {
|
|
|
|
+
|
|
public NoChildrenForEphemeralsException() {
|
|
public NoChildrenForEphemeralsException() {
|
|
super(Code.NOCHILDRENFOREPHEMERALS);
|
|
super(Code.NOCHILDRENFOREPHEMERALS);
|
|
}
|
|
}
|
|
public NoChildrenForEphemeralsException(String path) {
|
|
public NoChildrenForEphemeralsException(String path) {
|
|
super(Code.NOCHILDRENFOREPHEMERALS, path);
|
|
super(Code.NOCHILDRENFOREPHEMERALS, path);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -707,12 +736,14 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class NodeExistsException extends KeeperException {
|
|
public static class NodeExistsException extends KeeperException {
|
|
|
|
+
|
|
public NodeExistsException() {
|
|
public NodeExistsException() {
|
|
super(Code.NODEEXISTS);
|
|
super(Code.NODEEXISTS);
|
|
}
|
|
}
|
|
public NodeExistsException(String path) {
|
|
public NodeExistsException(String path) {
|
|
super(Code.NODEEXISTS, path);
|
|
super(Code.NODEEXISTS, path);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -720,12 +751,14 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class NoNodeException extends KeeperException {
|
|
public static class NoNodeException extends KeeperException {
|
|
|
|
+
|
|
public NoNodeException() {
|
|
public NoNodeException() {
|
|
super(Code.NONODE);
|
|
super(Code.NONODE);
|
|
}
|
|
}
|
|
public NoNodeException(String path) {
|
|
public NoNodeException(String path) {
|
|
super(Code.NONODE, path);
|
|
super(Code.NONODE, path);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -733,12 +766,14 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class NotEmptyException extends KeeperException {
|
|
public static class NotEmptyException extends KeeperException {
|
|
|
|
+
|
|
public NotEmptyException() {
|
|
public NotEmptyException() {
|
|
super(Code.NOTEMPTY);
|
|
super(Code.NOTEMPTY);
|
|
}
|
|
}
|
|
public NotEmptyException(String path) {
|
|
public NotEmptyException(String path) {
|
|
super(Code.NOTEMPTY, path);
|
|
super(Code.NOTEMPTY, path);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -746,9 +781,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class OperationTimeoutException extends KeeperException {
|
|
public static class OperationTimeoutException extends KeeperException {
|
|
|
|
+
|
|
public OperationTimeoutException() {
|
|
public OperationTimeoutException() {
|
|
super(Code.OPERATIONTIMEOUT);
|
|
super(Code.OPERATIONTIMEOUT);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -756,9 +793,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class RuntimeInconsistencyException extends KeeperException {
|
|
public static class RuntimeInconsistencyException extends KeeperException {
|
|
|
|
+
|
|
public RuntimeInconsistencyException() {
|
|
public RuntimeInconsistencyException() {
|
|
super(Code.RUNTIMEINCONSISTENCY);
|
|
super(Code.RUNTIMEINCONSISTENCY);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -766,9 +805,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class SessionExpiredException extends KeeperException {
|
|
public static class SessionExpiredException extends KeeperException {
|
|
|
|
+
|
|
public SessionExpiredException() {
|
|
public SessionExpiredException() {
|
|
super(Code.SESSIONEXPIRED);
|
|
super(Code.SESSIONEXPIRED);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -776,9 +817,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class UnknownSessionException extends KeeperException {
|
|
public static class UnknownSessionException extends KeeperException {
|
|
|
|
+
|
|
public UnknownSessionException() {
|
|
public UnknownSessionException() {
|
|
super(Code.UNKNOWNSESSION);
|
|
super(Code.UNKNOWNSESSION);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -786,9 +829,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class SessionMovedException extends KeeperException {
|
|
public static class SessionMovedException extends KeeperException {
|
|
|
|
+
|
|
public SessionMovedException() {
|
|
public SessionMovedException() {
|
|
super(Code.SESSIONMOVED);
|
|
super(Code.SESSIONMOVED);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -796,9 +841,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class NotReadOnlyException extends KeeperException {
|
|
public static class NotReadOnlyException extends KeeperException {
|
|
|
|
+
|
|
public NotReadOnlyException() {
|
|
public NotReadOnlyException() {
|
|
super(Code.NOTREADONLY);
|
|
super(Code.NOTREADONLY);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -806,9 +853,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class EphemeralOnLocalSessionException extends KeeperException {
|
|
public static class EphemeralOnLocalSessionException extends KeeperException {
|
|
|
|
+
|
|
public EphemeralOnLocalSessionException() {
|
|
public EphemeralOnLocalSessionException() {
|
|
super(Code.EPHEMERALONLOCALSESSION);
|
|
super(Code.EPHEMERALONLOCALSESSION);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -816,9 +865,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class SystemErrorException extends KeeperException {
|
|
public static class SystemErrorException extends KeeperException {
|
|
|
|
+
|
|
public SystemErrorException() {
|
|
public SystemErrorException() {
|
|
super(Code.SYSTEMERROR);
|
|
super(Code.SYSTEMERROR);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -826,9 +877,11 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class UnimplementedException extends KeeperException {
|
|
public static class UnimplementedException extends KeeperException {
|
|
|
|
+
|
|
public UnimplementedException() {
|
|
public UnimplementedException() {
|
|
super(Code.UNIMPLEMENTED);
|
|
super(Code.UNIMPLEMENTED);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -836,6 +889,7 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class NoWatcherException extends KeeperException {
|
|
public static class NoWatcherException extends KeeperException {
|
|
|
|
+
|
|
public NoWatcherException() {
|
|
public NoWatcherException() {
|
|
super(Code.NOWATCHER);
|
|
super(Code.NOWATCHER);
|
|
}
|
|
}
|
|
@@ -843,6 +897,7 @@ public abstract class KeeperException extends Exception {
|
|
public NoWatcherException(String path) {
|
|
public NoWatcherException(String path) {
|
|
super(Code.NOWATCHER, path);
|
|
super(Code.NOWATCHER, path);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -850,28 +905,39 @@ public abstract class KeeperException extends Exception {
|
|
*/
|
|
*/
|
|
@InterfaceAudience.Public
|
|
@InterfaceAudience.Public
|
|
public static class ReconfigDisabledException extends KeeperException {
|
|
public static class ReconfigDisabledException extends KeeperException {
|
|
- public ReconfigDisabledException() { super(Code.RECONFIGDISABLED); }
|
|
|
|
|
|
+
|
|
|
|
+ public ReconfigDisabledException() {
|
|
|
|
+ super(Code.RECONFIGDISABLED);
|
|
|
|
+ }
|
|
public ReconfigDisabledException(String path) {
|
|
public ReconfigDisabledException(String path) {
|
|
super(Code.RECONFIGDISABLED, path);
|
|
super(Code.RECONFIGDISABLED, path);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* @see Code#SESSIONCLOSEDREQUIRESASLAUTH
|
|
* @see Code#SESSIONCLOSEDREQUIRESASLAUTH
|
|
*/
|
|
*/
|
|
public static class SessionClosedRequireAuthException extends KeeperException {
|
|
public static class SessionClosedRequireAuthException extends KeeperException {
|
|
- public SessionClosedRequireAuthException() { super(Code.SESSIONCLOSEDREQUIRESASLAUTH); }
|
|
|
|
|
|
+
|
|
|
|
+ public SessionClosedRequireAuthException() {
|
|
|
|
+ super(Code.SESSIONCLOSEDREQUIRESASLAUTH);
|
|
|
|
+ }
|
|
public SessionClosedRequireAuthException(String path) {
|
|
public SessionClosedRequireAuthException(String path) {
|
|
super(Code.SESSIONCLOSEDREQUIRESASLAUTH, path);
|
|
super(Code.SESSIONCLOSEDREQUIRESASLAUTH, path);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* @see Code#REQUESTTIMEOUT
|
|
* @see Code#REQUESTTIMEOUT
|
|
*/
|
|
*/
|
|
public static class RequestTimeoutException extends KeeperException {
|
|
public static class RequestTimeoutException extends KeeperException {
|
|
|
|
+
|
|
public RequestTimeoutException() {
|
|
public RequestTimeoutException() {
|
|
super(Code.REQUESTTIMEOUT);
|
|
super(Code.REQUESTTIMEOUT);
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|