public enum NodeDistance extends Enum<NodeDistance>
The distance is assigned by a LoadBalancingPolicy
.
Enum Constant and Description |
---|
IGNORED
An "inactive" distance, that indicates that the driver will not open any connection to the
node.
|
LOCAL
An "active" distance that, indicates that the driver should maintain connections to the node;
it also marks it as "preferred", meaning that the number or capacity of the connections may be
higher, and that the node may also have priority for some tasks (for example, being chosen as
the control host).
|
REMOTE
An "active" distance that, indicates that the driver should maintain connections to the node;
it also marks it as "less preferred", meaning that the number or capacity of the connections
may be lower, and that other nodes may have a higher priority for some tasks (for example,
being chosen as the control host).
|
Modifier and Type | Method and Description |
---|---|
static NodeDistance |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NodeDistance[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NodeDistance LOCAL
public static final NodeDistance REMOTE
public static final NodeDistance IGNORED
public static NodeDistance[] values()
for (NodeDistance c : NodeDistance.values()) System.out.println(c);
public static NodeDistance 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 nullCopyright © 2017–2022. All rights reserved.