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)
name- the name of the enum constant to be returned.
IllegalArgumentException- if this enum type has no constant with the specified name
NullPointerException- if the argument is null
Copyright © 2012–2019. All rights reserved.