Package com.levigo.jadice.server.nodes
Enum RouterNode.RoutingPolicy
- java.lang.Object
-
- java.lang.Enum<RouterNode.RoutingPolicy>
-
- com.levigo.jadice.server.nodes.RouterNode.RoutingPolicy
-
- All Implemented Interfaces:
Serializable
,Comparable<RouterNode.RoutingPolicy>
- Enclosing class:
- RouterNode
public static enum RouterNode.RoutingPolicy extends Enum<RouterNode.RoutingPolicy>
Routing policy if several rules evaluate totrue
for a given stream.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EVERY_MATCH
The stream will be routed only all successor nodes where the corresponding routing rule evaluated totrue
.FIRST_MATCH
The stream will be routed only that successor node that corresponds with the first matching routing rule.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RouterNode.RoutingPolicy
valueOf(String name)
Returns the enum constant of this type with the specified name.static RouterNode.RoutingPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FIRST_MATCH
public static final RouterNode.RoutingPolicy FIRST_MATCH
The stream will be routed only that successor node that corresponds with the first matching routing rule. (default behavior)
-
EVERY_MATCH
public static final RouterNode.RoutingPolicy EVERY_MATCH
The stream will be routed only all successor nodes where the corresponding routing rule evaluated totrue
.As result the stream will be multiplexed and forwarded to several subsequent nodes.
-
-
Method Detail
-
values
public static RouterNode.RoutingPolicy[] 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 (RouterNode.RoutingPolicy c : RouterNode.RoutingPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RouterNode.RoutingPolicy 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
-
-