public static enum BaseLoadBalancer.Algorithm extends Enum<BaseLoadBalancer.Algorithm>
Enum Constant and 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.
|
Modifier and Type | Method and 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.
|
public static final BaseLoadBalancer.Algorithm LEAST_CONNECTIONS
public static final BaseLoadBalancer.Algorithm RANDOM
public static final BaseLoadBalancer.Algorithm ROUND_ROBIN
public static final BaseLoadBalancer.Algorithm WEIGHTED_LEAST_CONNECTIONS
public static final BaseLoadBalancer.Algorithm WEIGHTED_ROUND_ROBIN
public static final BaseLoadBalancer.Algorithm UNRECOGNIZED
public static BaseLoadBalancer.Algorithm[] values()
for (BaseLoadBalancer.Algorithm c : BaseLoadBalancer.Algorithm.values()) System.out.println(c);
public static BaseLoadBalancer.Algorithm 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 nullpublic static BaseLoadBalancer.Algorithm fromValue(String algorithm)
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.