Package com.opencloud.slee.remote
Enum ExecutionContext
- java.lang.Object
-
- java.lang.Enum<ExecutionContext>
-
- com.opencloud.slee.remote.ExecutionContext
-
- All Implemented Interfaces:
Serializable
,Comparable<ExecutionContext>
public enum ExecutionContext extends Enum<ExecutionContext>
Defines execution contexts for MBean operations. An execution context can be used to control the behaviour during connection failover. The execution context can be set at any time on aRhinoConnection
usingRhinoConnection.setAllowedExecutionContext(ExecutionContext)
and will remain in force until it is reset. The default value is CLUSTER.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLUSTER
Allow commands to executed on any connection and on any node.CONNECTION
Allow commands to execute only on the current connection.NODE
Allow commands to executed on any connection, as long as a new connection is made to the same node as the previous command was executed on.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExecutionContext
valueOf(String name)
Returns the enum constant of this type with the specified name.static ExecutionContext[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONNECTION
public static final ExecutionContext CONNECTION
Allow commands to execute only on the current connection. If the connection fails, an exception will be thrown.
-
NODE
public static final ExecutionContext NODE
Allow commands to executed on any connection, as long as a new connection is made to the same node as the previous command was executed on. If a new connection is made to a different node, then an exception will be thrown.
-
CLUSTER
public static final ExecutionContext CLUSTER
Allow commands to executed on any connection and on any node. An exception will only be thrown if the client cannot connect to any node.
-
-
Method Detail
-
values
public static ExecutionContext[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ExecutionContext c : ExecutionContext.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ExecutionContext valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-