public enum HostDistance extends Enum<HostDistance>
The distance assigned to an host influences how many connections the driver maintains towards
this host. If for a given host the assigned
REMOTE, some connections will be maintained by the driver to this host. More active connections
will be kept to
LOCAL host than to a
REMOTE one (and thus well behaving
LoadBalancingPolicy should assign a
REMOTE distance only to hosts that are the less
However, if a host is assigned the distance
IGNORED, no connection to that host will
maintained active. In other words,
IGNORED should be assigned to hosts that should not be
used by this driver (because they are in a remote data center for instance).
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final HostDistance LOCAL
public static final HostDistance REMOTE
public static final HostDistance IGNORED
public static HostDistance values()
for (HostDistance c : HostDistance.values()) System.out.println(c);
public static HostDistance valueOf(String name)
Copyright © 2012–2020. All rights reserved.