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 a RhinoConnection
using RhinoConnection.setAllowedExecutionContext(ExecutionContext)
and will remain in force until it is reset.
The default value is CLUSTER.
Enum Constant and 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.
|
Modifier and Type | Method and 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.
|
public static final ExecutionContext CONNECTION
Allow commands to execute only on the current connection. If the connection fails, an exception will be thrown.
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.
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.
public static ExecutionContext[] values()
for (ExecutionContext c : ExecutionContext.values()) System.out.println(c);
public static ExecutionContext 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 null