Enum BaseLoadBalancer.Algorithm
- java.lang.Object
-
- java.lang.Enum<BaseLoadBalancer.Algorithm>
-
- org.jclouds.rackspace.cloudloadbalancers.v1.domain.internal.BaseLoadBalancer.Algorithm
-
- All Implemented Interfaces:
Serializable
,Comparable<BaseLoadBalancer.Algorithm>
- Enclosing class:
- BaseLoadBalancer<N extends BaseNode<N>,T extends BaseLoadBalancer<N,T>>
public static enum BaseLoadBalancer.Algorithm extends Enum<BaseLoadBalancer.Algorithm>
All load balancers utilize an algorithm that defines how traffic should be directed between back-end nodes. The default algorithm for newly created load balancers is RANDOM, which can be overridden at creation time or changed after the load balancer has been initially provisioned. The algorithm name is to be constant within a major revision of the load balancing API, though new algorithms may be created with a unique algorithm name within a given major revision of the service API.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LEAST_CONNECTIONS
The node with the lowest number of connections will receive requests.RANDOM
Back-end servers are selected at random.ROUND_ROBIN
Connections are routed to each of the back-end servers in turn.UNRECOGNIZED
WEIGHTED_LEAST_CONNECTIONS
Each request will be assigned to a node based on the number of concurrent connections to the node and its weight.WEIGHTED_ROUND_ROBIN
A round robin algorithm, but with different proportions of traffic being directed to the back-end nodes.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BaseLoadBalancer.Algorithm
fromValue(String algorithm)
static BaseLoadBalancer.Algorithm
valueOf(String name)
Returns the enum constant of this type with the specified name.static BaseLoadBalancer.Algorithm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LEAST_CONNECTIONS
public static final BaseLoadBalancer.Algorithm LEAST_CONNECTIONS
The node with the lowest number of connections will receive requests.
-
RANDOM
public static final BaseLoadBalancer.Algorithm RANDOM
Back-end servers are selected at random.
-
ROUND_ROBIN
public static final BaseLoadBalancer.Algorithm ROUND_ROBIN
Connections are routed to each of the back-end servers in turn.
-
WEIGHTED_LEAST_CONNECTIONS
public static final BaseLoadBalancer.Algorithm WEIGHTED_LEAST_CONNECTIONS
Each request will be assigned to a node based on the number of concurrent connections to the node and its weight.
-
WEIGHTED_ROUND_ROBIN
public static final BaseLoadBalancer.Algorithm WEIGHTED_ROUND_ROBIN
A round robin algorithm, but with different proportions of traffic being directed to the back-end nodes. Weights must be defined as part of the load balancer's node configuration.
-
UNRECOGNIZED
public static final BaseLoadBalancer.Algorithm UNRECOGNIZED
-
-
Method Detail
-
values
public static BaseLoadBalancer.Algorithm[] 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 (BaseLoadBalancer.Algorithm c : BaseLoadBalancer.Algorithm.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BaseLoadBalancer.Algorithm 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
-
fromValue
public static BaseLoadBalancer.Algorithm fromValue(String algorithm)
-
-