|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectme.prettyprint.cassandra.service.CassandraHostConfigurator
public final class CassandraHostConfigurator
| Field Summary | |
|---|---|
static ClockResolution |
DEF_CLOCK_RESOLUTION
|
| Constructor Summary | |
|---|---|
CassandraHostConfigurator()
|
|
CassandraHostConfigurator(String hosts)
Creates a new CassandraHostConfigurator from the specified hosts String, formatted as
host[:port][,host[:port]...]. |
|
| Method Summary | |
|---|---|
void |
applyConfig(CassandraHost cassandraHost)
|
CassandraHost[] |
buildCassandraHosts()
|
boolean |
getAutoDiscoverHosts()
|
List<String> |
getAutoDiscoveryDataCenters()
Retrieves the 'local' datacenter names that the DiscoveryService recognizes as valid in order to discover new hosts. |
int |
getAutoDiscoveryDelayInSeconds()
|
Class<? extends HClientFactory> |
getClientFactoryClass()
|
static ClockResolution |
getClockResolution()
|
int |
getHostTimeoutCounter()
|
int |
getHostTimeoutSuspensionDurationInSeconds()
|
int |
getHostTimeoutUnsuspendCheckDelay()
|
int |
getHostTimeoutWindow()
|
boolean |
getLifo()
|
LoadBalancingPolicy |
getLoadBalancingPolicy()
|
long |
getMaxConnectTimeMillis()
The maximum time in milliseconds that we'll allow a connection to stay open to a host. |
long |
getMaxLastSuccessTimeMillis()
The maximum time in milliseconds that we'll allow a connection to stay idle to a host. |
HOpTimer |
getOpTimer()
|
int |
getPort()
|
boolean |
getRetryDownedHosts()
|
int |
getRetryDownedHostsDelayInSeconds()
|
int |
getRetryDownedHostsQueueSize()
|
boolean |
getRunAutoDiscoveryAtStartup()
|
boolean |
getUseHostTimeoutTracker()
|
boolean |
getUseSocketKeepalive()
|
void |
setAutoDiscoverHosts(boolean autoDiscoverHosts)
|
void |
setAutoDiscoveryDataCenter(List<String> dataCenters)
Sets the datacenters for the DiscoveryService. |
void |
setAutoDiscoveryDataCenter(String dataCenter)
Sets the local datacenter for the DiscoveryService. |
void |
setAutoDiscoveryDelayInSeconds(int autoDiscoveryDelayInSeconds)
|
void |
setCassandraThriftSocketTimeout(int cassandraThriftSocketTimeout)
The value (in milliseconds) which gets passed down to Socket.setSoTimeout(int)
used by the underlying Thrift transport. |
void |
setClientFactoryClass(String cls)
|
static void |
setClockResolution(ClockResolution clockResolution)
Sets this Clock for all clusters administered by Hector. |
static void |
setClockResolution(String resolutionString)
Sets this Clock for all clusters administered by Hector. |
void |
setHosts(String hosts)
Specifies the hosts String, formatted as host[:port][,host[:port]...]. |
void |
setHostTimeoutCounter(int hostTimeoutCounter)
|
void |
setHostTimeoutSuspensionDurationInSeconds(int hostTimeoutSuspensionDurationInSeconds)
|
void |
setHostTimeoutUnsuspendCheckDelay(int hostTimeoutUnsuspendCheckDelay)
|
void |
setHostTimeoutWindow(int hostTimeoutWindow)
|
void |
setLifo(boolean lifo)
|
void |
setLoadBalancingPolicy(LoadBalancingPolicy loadBalancingPolicy)
|
void |
setMaxActive(int maxActive)
|
void |
setMaxConnectTimeMillis(long maxConnectTimeMillis)
Set the maximum time in milliseconds that we'll allow a connection to stay open to a host. |
void |
setMaxFrameSize(int maxFrameSize)
|
void |
setMaxLastSuccessTimeMillis(long maxLastSuccessTimeMillis)
Set the maximum time in milliseconds that we'll allow a connection to stay idle to a host. |
void |
setMaxWaitTimeWhenExhausted(long maxWaitTimeWhenExhausted)
|
void |
setOpTimer(HOpTimer opTimer)
|
void |
setPort(int port)
|
void |
setRetryDownedHosts(boolean retryDownedHosts)
|
void |
setRetryDownedHostsDelayInSeconds(int retryDownedHostsDelayInSeconds)
|
void |
setRetryDownedHostsQueueSize(int retryDownedHostsQueueSize)
|
void |
setRunAutoDiscoveryAtStartup(boolean runAutoDiscoveryAtStartup)
Set to true to run NodeAutoDiscoverService at startup. |
void |
setUseHostTimeoutTracker(boolean useHostTimeoutTracker)
|
void |
setUseSocketKeepalive(boolean useSocketKeepalive)
Enable SO_KEEPALIVE on the underlying socket. |
void |
setUseThriftFramedTransport(boolean useThriftFramedTransport)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ClockResolution DEF_CLOCK_RESOLUTION
| Constructor Detail |
|---|
public CassandraHostConfigurator()
public CassandraHostConfigurator(String hosts)
CassandraHostConfigurator from the specified hosts String, formatted as
host[:port][,host[:port]...].
hosts - The hosts to create CassandraHosts from.| Method Detail |
|---|
public CassandraHost[] buildCassandraHosts()
public void applyConfig(CassandraHost cassandraHost)
public void setHosts(String hosts)
host[:port][,host[:port]...].
hosts - The hosts to create CassandraHosts from.public void setMaxActive(int maxActive)
public void setMaxWaitTimeWhenExhausted(long maxWaitTimeWhenExhausted)
public void setCassandraThriftSocketTimeout(int cassandraThriftSocketTimeout)
Socket.setSoTimeout(int)
used by the underlying Thrift transport.
public boolean getRetryDownedHosts()
public void setRetryDownedHosts(boolean retryDownedHosts)
public void setRetryDownedHostsQueueSize(int retryDownedHostsQueueSize)
public int getRetryDownedHostsQueueSize()
public void setRetryDownedHostsDelayInSeconds(int retryDownedHostsDelayInSeconds)
public int getRetryDownedHostsDelayInSeconds()
public static void setClockResolution(String resolutionString)
resolutionString - one of "SECONDS", "MILLISECONDS", "MICROSECONDS" or "MICROSECONDS_SYNC"public HOpTimer getOpTimer()
public void setOpTimer(HOpTimer opTimer)
public String toString()
toString in class Objectpublic boolean getLifo()
public void setLifo(boolean lifo)
public int getPort()
public void setPort(int port)
public void setUseThriftFramedTransport(boolean useThriftFramedTransport)
public void setMaxFrameSize(int maxFrameSize)
public static ClockResolution getClockResolution()
public static void setClockResolution(ClockResolution clockResolution)
clockResolution - a specific ClockResolutionpublic boolean getAutoDiscoverHosts()
public void setAutoDiscoverHosts(boolean autoDiscoverHosts)
public int getAutoDiscoveryDelayInSeconds()
public void setAutoDiscoveryDelayInSeconds(int autoDiscoveryDelayInSeconds)
public void setAutoDiscoveryDataCenter(String dataCenter)
dataCenter - DataCenter namepublic void setAutoDiscoveryDataCenter(List<String> dataCenters)
public List<String> getAutoDiscoveryDataCenters()
public LoadBalancingPolicy getLoadBalancingPolicy()
public void setLoadBalancingPolicy(LoadBalancingPolicy loadBalancingPolicy)
public int getHostTimeoutCounter()
public void setHostTimeoutCounter(int hostTimeoutCounter)
public int getHostTimeoutWindow()
public void setHostTimeoutWindow(int hostTimeoutWindow)
public int getHostTimeoutSuspensionDurationInSeconds()
public void setHostTimeoutSuspensionDurationInSeconds(int hostTimeoutSuspensionDurationInSeconds)
public int getHostTimeoutUnsuspendCheckDelay()
public void setHostTimeoutUnsuspendCheckDelay(int hostTimeoutUnsuspendCheckDelay)
public boolean getUseHostTimeoutTracker()
public void setUseHostTimeoutTracker(boolean useHostTimeoutTracker)
public boolean getRunAutoDiscoveryAtStartup()
public void setRunAutoDiscoveryAtStartup(boolean runAutoDiscoveryAtStartup)
NodeAutoDiscoverService at startup.
You must also call setAutoDiscoverHosts(boolean)
to true for this to have an effect.
runAutoDiscoveryAtStartup - public boolean getUseSocketKeepalive()
public void setUseSocketKeepalive(boolean useSocketKeepalive)
public void setClientFactoryClass(String cls)
public Class<? extends HClientFactory> getClientFactoryClass()
public long getMaxConnectTimeMillis()
public void setMaxConnectTimeMillis(long maxConnectTimeMillis)
maxConnectTimeMillis - the maximum time to use a connectionpublic long getMaxLastSuccessTimeMillis()
public void setMaxLastSuccessTimeMillis(long maxLastSuccessTimeMillis)
setMaxLastSuccessTimeMillis, the first way, that is, the most used way,
to try to work around a firewall problem should be to use the socket "keepalive" mechanism, see
setUseSocketKeepalive method. The current method setMaxLastSuccessTimeMillis
is generally used for dealing with firewalls when the "keepalive" mechanism could not be used.
maxLastSuccessTimeMillis - the maximum idle time for a connection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||