|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvoldemort.client.ClientConfig
public class ClientConfig
A configuration object that holds configuration parameters for the client.
| Constructor Summary | |
|---|---|
ClientConfig()
|
|
ClientConfig(java.util.Properties properties)
Initiate the client config from a set of properties. |
|
| Method Summary | |
|---|---|
java.lang.String[] |
getBootstrapUrls()
|
int |
getConnectionTimeout(java.util.concurrent.TimeUnit unit)
|
long |
getFailureDetectorAsyncRecoveryInterval()
|
long |
getFailureDetectorBannagePeriod()
|
java.util.List<java.lang.String> |
getFailureDetectorCatastrophicErrorTypes()
|
java.lang.String |
getFailureDetectorImplementation()
|
long |
getFailureDetectorRequestLengthThreshold()
|
int |
getFailureDetectorThreshold()
|
int |
getFailureDetectorThresholdCountMinimum()
|
long |
getFailureDetectorThresholdInterval()
|
int |
getMaxBootstrapRetries()
|
int |
getMaxConnectionsPerNode()
|
int |
getMaxQueuedRequests()
|
int |
getMaxThreads()
|
int |
getMaxTotalConnections()
|
int |
getNodeBannagePeriod(java.util.concurrent.TimeUnit unit)
Deprecated. Use getFailureDetectorBannagePeriod() instead |
RequestFormatType |
getRequestFormatType()
|
RoutingTier |
getRoutingTier()
|
int |
getRoutingTimeout(java.util.concurrent.TimeUnit unit)
|
SerializerFactory |
getSerializerFactory()
|
int |
getSocketBufferSize()
|
boolean |
getSocketKeepAlive()
|
int |
getSocketTimeout(java.util.concurrent.TimeUnit unit)
|
int |
getThreadIdleTime(java.util.concurrent.TimeUnit unit)
|
boolean |
isJmxEnabled()
|
ClientConfig |
setBootstrapUrls(java.util.List<java.lang.String> bootstrapUrls)
Set the bootstrap urls from which to attempt a connection |
ClientConfig |
setBootstrapUrls(java.lang.String... bootstrapUrls)
Set the bootstrap urls from which to attempt a connection |
ClientConfig |
setConnectionTimeout(int connectionTimeout,
java.util.concurrent.TimeUnit unit)
Set the maximum allowable time to block waiting for a free connection |
ClientConfig |
setEnableJmx(boolean enableJmx)
Enable JMX monitoring of the clients? |
ClientConfig |
setFailureDetectorAsyncRecoveryInterval(long failureDetectorAsyncRecoveryInterval)
|
ClientConfig |
setFailureDetectorBannagePeriod(long failureDetectorBannagePeriod)
|
ClientConfig |
setFailureDetectorCatastrophicErrorTypes(java.util.List<java.lang.String> failureDetectorCatastrophicErrorTypes)
|
ClientConfig |
setFailureDetectorImplementation(java.lang.String failureDetectorImplementation)
|
ClientConfig |
setFailureDetectorRequestLengthThreshold(long failureDetectorRequestLengthThreshold)
|
ClientConfig |
setFailureDetectorThreshold(int failureDetectorThreshold)
|
ClientConfig |
setFailureDetectorThresholdCountMinimum(int failureDetectorThresholdCountMinimum)
|
ClientConfig |
setFailureDetectorThresholdInterval(long failureDetectorThresholdInterval)
|
ClientConfig |
setMaxBootstrapRetries(int maxBootstrapRetries)
If we are unable to bootstrap, how many times should we re-try? |
ClientConfig |
setMaxConnectionsPerNode(int maxConnectionsPerNode)
Set the maximum number of connection allowed to each voldemort node |
ClientConfig |
setMaxQueuedRequests(int maxQueuedRequests)
Set the maximum number of queued node operations before client actions will be blocked |
ClientConfig |
setMaxThreads(int maxThreads)
Set the maximum number of client threads |
ClientConfig |
setMaxTotalConnections(int maxTotalConnections)
Set the maximum number of connections allowed to all voldemort nodes |
ClientConfig |
setNodeBannagePeriod(int nodeBannagePeriod,
java.util.concurrent.TimeUnit unit)
Deprecated. Use setFailureDetectorBannagePeriod(long) instead |
ClientConfig |
setRequestFormatType(RequestFormatType requestFormatType)
Set the request format type used for network communications (for example protocol buffers) |
ClientConfig |
setRoutingTier(RoutingTier routingTier)
Set the tier at which routing occurs. |
ClientConfig |
setRoutingTimeout(int routingTimeout,
java.util.concurrent.TimeUnit unit)
Set the timeout for all blocking operations to complete on all nodes. |
ClientConfig |
setSerializerFactory(SerializerFactory serializerFactory)
Set the SerializerFactory used to serialize and deserialize values |
ClientConfig |
setSocketBufferSize(int socketBufferSize)
Set the size of the socket buffer to use for both socket reads and socket writes |
ClientConfig |
setSocketKeepAlive(boolean socketKeepAlive)
|
ClientConfig |
setSocketTimeout(int socketTimeout,
java.util.concurrent.TimeUnit unit)
Set the SO_TIMEOUT for the socket if using HTTP or socket based network communication. |
ClientConfig |
setThreadIdleTime(long threadIdleTime,
java.util.concurrent.TimeUnit unit)
The amount of time to keep an idle client thread alive |
int |
toInt(long l)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MAX_CONNECTIONS_PER_NODE_PROPERTY
public static final java.lang.String MAX_TOTAL_CONNECTIONS_PROPERTY
public static final java.lang.String MAX_THREADS_PROPERTY
public static final java.lang.String MAX_QUEUED_REQUESTS_PROPERTY
public static final java.lang.String THREAD_IDLE_MS_PROPERTY
public static final java.lang.String CONNECTION_TIMEOUT_MS_PROPERTY
public static final java.lang.String SOCKET_TIMEOUT_MS_PROPERTY
public static final java.lang.String SOCKET_KEEPALIVE_PROPERTY
public static final java.lang.String ROUTING_TIMEOUT_MS_PROPERTY
public static final java.lang.String NODE_BANNAGE_MS_PROPERTY
public static final java.lang.String SOCKET_BUFFER_SIZE_PROPERTY
public static final java.lang.String SERIALIZER_FACTORY_CLASS_PROPERTY
public static final java.lang.String BOOTSTRAP_URLS_PROPERTY
public static final java.lang.String REQUEST_FORMAT_PROPERTY
public static final java.lang.String ENABLE_JMX_PROPERTY
public static final java.lang.String FAILUREDETECTOR_IMPLEMENTATION_PROPERTY
public static final java.lang.String FAILUREDETECTOR_BANNAGE_PERIOD_PROPERTY
public static final java.lang.String FAILUREDETECTOR_THRESHOLD_PROPERTY
public static final java.lang.String FAILUREDETECTOR_THRESHOLD_INTERVAL_PROPERTY
public static final java.lang.String FAILUREDETECTOR_THRESHOLD_COUNTMINIMUM_PROPERTY
public static final java.lang.String FAILUREDETECTOR_ASYNCRECOVERY_INTERVAL_PROPERTY
public static final java.lang.String FAILUREDETECTOR_CATASTROPHIC_ERROR_TYPES_PROPERTY
public static final java.lang.String FAILUREDETECTOR_REQUEST_LENGTH_THRESHOLD_PROPERTY
public static final java.lang.String MAX_BOOTSTRAP_RETRIES
| Constructor Detail |
|---|
public ClientConfig()
public ClientConfig(java.util.Properties properties)
properties - The properties to use| Method Detail |
|---|
public int getMaxConnectionsPerNode()
public ClientConfig setMaxConnectionsPerNode(int maxConnectionsPerNode)
maxConnectionsPerNode - The maximum number of connectionspublic int getMaxTotalConnections()
public ClientConfig setMaxTotalConnections(int maxTotalConnections)
maxTotalConnections - The maximum total number of connectionspublic int getSocketTimeout(java.util.concurrent.TimeUnit unit)
public ClientConfig setSocketTimeout(int socketTimeout,
java.util.concurrent.TimeUnit unit)
socketTimeout - The socket timeoutunit - The time unit of the timeout valuepublic boolean getSocketKeepAlive()
public ClientConfig setSocketKeepAlive(boolean socketKeepAlive)
public int getRoutingTimeout(java.util.concurrent.TimeUnit unit)
public ClientConfig setRoutingTimeout(int routingTimeout,
java.util.concurrent.TimeUnit unit)
routingTimeout - The timeout for all operations to complete.unit - The time unit of the timeout value@Deprecated public int getNodeBannagePeriod(java.util.concurrent.TimeUnit unit)
getFailureDetectorBannagePeriod() instead
@Deprecated
public ClientConfig setNodeBannagePeriod(int nodeBannagePeriod,
java.util.concurrent.TimeUnit unit)
setFailureDetectorBannagePeriod(long) instead
nodeBannagePeriod - The period of time to ban the nodeunit - The time unit of the given valuepublic int getConnectionTimeout(java.util.concurrent.TimeUnit unit)
public ClientConfig setConnectionTimeout(int connectionTimeout,
java.util.concurrent.TimeUnit unit)
connectionTimeout - The connection timeoutunit - The time unit of the given valuepublic int getThreadIdleTime(java.util.concurrent.TimeUnit unit)
public ClientConfig setThreadIdleTime(long threadIdleTime,
java.util.concurrent.TimeUnit unit)
threadIdleTime - public int getMaxQueuedRequests()
public ClientConfig setMaxQueuedRequests(int maxQueuedRequests)
maxQueuedRequests - The maximum number of queued requestspublic int getSocketBufferSize()
public ClientConfig setSocketBufferSize(int socketBufferSize)
socketBufferSize - The size of the socket buffer in bytespublic SerializerFactory getSerializerFactory()
public ClientConfig setSerializerFactory(SerializerFactory serializerFactory)
public java.lang.String[] getBootstrapUrls()
public ClientConfig setBootstrapUrls(java.util.List<java.lang.String> bootstrapUrls)
bootstrapUrls - The urls to bootstrap frompublic ClientConfig setBootstrapUrls(java.lang.String... bootstrapUrls)
bootstrapUrls - The urls to bootstrap frompublic RequestFormatType getRequestFormatType()
public ClientConfig setRequestFormatType(RequestFormatType requestFormatType)
requestFormatType - The type of the network protocolpublic RoutingTier getRoutingTier()
public ClientConfig setRoutingTier(RoutingTier routingTier)
routingTier - The routing tier to use for routing requestspublic int getMaxThreads()
public ClientConfig setMaxThreads(int maxThreads)
maxThreads - The maximum number of client threadspublic int toInt(long l)
public boolean isJmxEnabled()
public ClientConfig setEnableJmx(boolean enableJmx)
enableJmx - If true JMX monitoring of the clients will be enabledpublic java.lang.String getFailureDetectorImplementation()
public ClientConfig setFailureDetectorImplementation(java.lang.String failureDetectorImplementation)
public long getFailureDetectorBannagePeriod()
public ClientConfig setFailureDetectorBannagePeriod(long failureDetectorBannagePeriod)
public int getFailureDetectorThreshold()
public ClientConfig setFailureDetectorThreshold(int failureDetectorThreshold)
public int getFailureDetectorThresholdCountMinimum()
public ClientConfig setFailureDetectorThresholdCountMinimum(int failureDetectorThresholdCountMinimum)
public long getFailureDetectorThresholdInterval()
public ClientConfig setFailureDetectorThresholdInterval(long failureDetectorThresholdInterval)
public long getFailureDetectorAsyncRecoveryInterval()
public ClientConfig setFailureDetectorAsyncRecoveryInterval(long failureDetectorAsyncRecoveryInterval)
public java.util.List<java.lang.String> getFailureDetectorCatastrophicErrorTypes()
public ClientConfig setFailureDetectorCatastrophicErrorTypes(java.util.List<java.lang.String> failureDetectorCatastrophicErrorTypes)
public long getFailureDetectorRequestLengthThreshold()
public ClientConfig setFailureDetectorRequestLengthThreshold(long failureDetectorRequestLengthThreshold)
public int getMaxBootstrapRetries()
public ClientConfig setMaxBootstrapRetries(int maxBootstrapRetries)
maxBootstrapRetries - Maximum times to retry bootstrapping (must be
>= 1)
java.lang.IllegalArgumentException - If maxBootstrapRetries < 1
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||