|
||||||||||
| 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.io.File propertyFile)
Instantiate the client config using a properties file |
|
ClientConfig(java.util.Properties properties)
Initiate the client config from a set of properties. |
|
| Method Summary | |
|---|---|
ClientConfig |
enableDefaultClient(boolean enableDefault)
Whether or not a ZenStoreClient is created as opposed to a
DefaultStoreClient
true = DefaultStoreClient and false = ZenStoreClient |
int |
getAsyncJobThreadPoolSize()
|
long |
getAsyncMetadataRefreshInMs()
|
java.lang.String[] |
getBootstrapUrls()
|
java.lang.String |
getClientContextName()
|
int |
getClientRegistryUpdateIntervalInSecs()
|
int |
getClientZoneId()
|
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()
Deprecated. |
int |
getNodeBannagePeriod(java.util.concurrent.TimeUnit unit)
Deprecated. Use getFailureDetectorBannagePeriod() instead |
RequestFormatType |
getRequestFormatType()
|
RoutingTier |
getRoutingTier()
|
int |
getRoutingTimeout(java.util.concurrent.TimeUnit unit)
|
int |
getSelectors()
|
SerializerFactory |
getSerializerFactory()
|
int |
getSocketBufferSize()
|
boolean |
getSocketKeepAlive()
|
int |
getSocketTimeout(java.util.concurrent.TimeUnit unit)
|
int |
getSysConnectionTimeout()
|
boolean |
getSysEnableJmx()
|
boolean |
getSysEnablePipelineRoutedStore()
|
int |
getSysMaxConnectionsPerNode()
|
int |
getSysRoutingTimeout()
|
int |
getSysSocketTimeout()
|
int |
getThreadIdleTime(java.util.concurrent.TimeUnit unit)
Deprecated. |
TimeoutConfig |
getTimeoutConfig()
Get the timeouts for voldemort operations |
boolean |
isDefaultClientEnabled()
|
boolean |
isJmxEnabled()
|
boolean |
isLazyEnabled()
|
boolean |
isPipelineRoutedStoreEnabled()
|
ClientConfig |
setAsyncJobThreadPoolSize(int asyncJobThreadPoolSize)
Set the # of threads for the async. |
ClientConfig |
setAsyncMetadataRefreshInMs(long asyncCheckMetadataIntervalMs)
Set the interval on which client checks for metadata change on servers |
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 |
setClientContextName(java.lang.String clientContextName)
Set the client context name |
ClientConfig |
setClientRegistryUpdateIntervalInSecs(int clientRegistryRefrshIntervalInSecs)
Set the interval on which client refreshes its corresponding entry of the client registry on the servers |
ClientConfig |
setClientZoneId(int clientZoneId)
Sets the zone the client belongs to. |
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 |
setEnableLazy(boolean enableLazy)
Enable lazy initialization of clients? |
ClientConfig |
setEnablePipelineRoutedStore(boolean enablePipelineRoutedStore)
Whether or not to use the Pipeline routing which is much more resource efficient by employing Java NIO to handle communication with the server |
ClientConfig |
setFailureDetectorAsyncRecoveryInterval(long failureDetectorAsyncRecoveryInterval)
Number of milliseconds, to try to check if a marked down server has come back up again |
ClientConfig |
setFailureDetectorBannagePeriod(long failureDetectorBannagePeriod)
|
ClientConfig |
setFailureDetectorCatastrophicErrorTypes(java.util.List<java.lang.String> failureDetectorCatastrophicErrorTypes)
Sets the exception types that should be treated as catastrophic,by the failure detector, resulting in the server being immediately considered down. |
ClientConfig |
setFailureDetectorImplementation(java.lang.String failureDetectorImplementation)
FailureDetector to use. |
ClientConfig |
setFailureDetectorRequestLengthThreshold(long failureDetectorRequestLengthThreshold)
Sets the maximum amount of time a request is allowed to take, to be not considered as a "slow" request and count against the server, in terms of failure detection |
ClientConfig |
setFailureDetectorThreshold(int failureDetectorThreshold)
Set the percentage of exceptions that tolerated in a given failure detector window. |
ClientConfig |
setFailureDetectorThresholdCountMinimum(int failureDetectorThresholdCountMinimum)
Sets the minimum number of failures (exceptions/slow responses) in a given failure detector window, for a server to be marked down. |
ClientConfig |
setFailureDetectorThresholdInterval(long failureDetectorThresholdIntervalMs)
Time window in ms, over which the failure detector accounts the failures and successes |
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 connections 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)
Deprecated. |
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 |
setSelectors(int selectors)
Number of NIO selector threads to use, to handle communication with the server.Typically, this is same as the number of cores in the client machine |
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)
Enabled/disable SO_KEEPALIVE on the connection created with the voldemort servers |
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 |
setSysEnableJmx(boolean sysEnableJmx)
Whether or not JMX monitoring is enabled for the system store |
ClientConfig |
setSysEnablePipelineRoutedStore(boolean sysEnablePipelineRoutedStore)
Should pipleline store be used by the system store client? |
ClientConfig |
setThreadIdleTime(long threadIdleTime,
java.util.concurrent.TimeUnit unit)
Deprecated. |
ClientConfig |
setTimeoutConfig(TimeoutConfig tConfig)
Set the timeout configuration for the voldemort operations |
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 SELECTORS_PROPERTY
public static final java.lang.String ROUTING_TIMEOUT_MS_PROPERTY
public static final java.lang.String GETALL_ROUTING_TIMEOUT_MS_PROPERTY
public static final java.lang.String PUT_ROUTING_TIMEOUT_MS_PROPERTY
public static final java.lang.String GET_ROUTING_TIMEOUT_MS_PROPERTY
public static final java.lang.String GET_VERSIONS_ROUTING_TIMEOUT_MS_PROPERTY
public static final java.lang.String DELETE_ROUTING_TIMEOUT_MS_PROPERTY
public static final java.lang.String ALLOW_PARTIAL_GETALLS_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 ENABLE_PIPELINE_ROUTED_STORE_PROPERTY
public static final java.lang.String ENABLE_HINTED_HANDOFF_PROPERTY
public static final java.lang.String ENABLE_LAZY_PROPERTY
public static final java.lang.String CLIENT_ZONE_ID
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
public static final java.lang.String CLIENT_CONTEXT_NAME
public static final java.lang.String ASYNC_CHECK_METADATA_INTERVAL
public static final java.lang.String USE_DEFAULT_CLIENT
public static final java.lang.String CLIENT_REGISTRY_REFRESH_INTERVAL
public static final java.lang.String ASYNC_JOB_THREAD_POOL_SIZE
public static final java.lang.String SYS_MAX_CONNECTIONS_PER_NODE
public static final java.lang.String SYS_ROUTING_TIMEOUT_MS
public static final java.lang.String SYS_CONNECTION_TIMEOUT_MS
public static final java.lang.String SYS_SOCKET_TIMEOUT_MS
public static final java.lang.String SYS_ENABLE_JMX
public static final java.lang.String SYS_ENABLE_PIPELINE_ROUTED_STORE
| Constructor Detail |
|---|
public ClientConfig()
public ClientConfig(java.io.File propertyFile)
propertyFile - Properties filepublic ClientConfig(java.util.Properties properties)
properties - The properties to use| Method Detail |
|---|
public int getSysMaxConnectionsPerNode()
public int getSysRoutingTimeout()
public int getSysSocketTimeout()
public int getSysConnectionTimeout()
public ClientConfig setSysEnableJmx(boolean sysEnableJmx)
sysEnableJmx -
public boolean getSysEnableJmx()
public ClientConfig setSysEnablePipelineRoutedStore(boolean sysEnablePipelineRoutedStore)
sysEnablePipelineRoutedStore -
public boolean getSysEnablePipelineRoutedStore()
public int getMaxConnectionsPerNode()
public ClientConfig setMaxConnectionsPerNode(int maxConnectionsPerNode)
maxConnectionsPerNode - The maximum 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)
socketKeepAlive -
public int getSelectors()
public ClientConfig setSelectors(int selectors)
selectors -
public int getRoutingTimeout(java.util.concurrent.TimeUnit unit)
public ClientConfig setRoutingTimeout(int routingTimeout,
java.util.concurrent.TimeUnit unit)
GETALL_ROUTING_TIMEOUT_MS_PROPERTY,
GET_ROUTING_TIMEOUT_MS_PROPERTY,
PUT_ROUTING_TIMEOUT_MS_PROPERTY,
DELETE_ROUTING_TIMEOUT_MS_PROPERTY to override timeouts for
specific operations
routingTimeout - The timeout for all operations to complete.unit - The time unit of the timeout valuepublic ClientConfig setTimeoutConfig(TimeoutConfig tConfig)
tConfig -
public TimeoutConfig getTimeoutConfig()
@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 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 threads@Deprecated public int getMaxTotalConnections()
@Deprecated public int getThreadIdleTime(java.util.concurrent.TimeUnit unit)
@Deprecated
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 requests@Deprecated public ClientConfig setMaxTotalConnections(int maxTotalConnections)
maxTotalConnections - The maximum total number of connectionspublic int toInt(long l)
public boolean isJmxEnabled()
public ClientConfig setEnableJmx(boolean enableJmx)
enableJmx - If true JMX monitoring of the clients will be enabledpublic boolean isLazyEnabled()
public ClientConfig setEnableLazy(boolean enableLazy)
enableLazy - If true clients will be lazily initializedpublic ClientConfig setClientZoneId(int clientZoneId)
clientZoneId -
public int getClientZoneId()
public ClientConfig enableDefaultClient(boolean enableDefault)
ZenStoreClient is created as opposed to a
DefaultStoreClient
true = DefaultStoreClient and false = ZenStoreClient
enableDefault -
public boolean isDefaultClientEnabled()
public boolean isPipelineRoutedStoreEnabled()
public ClientConfig setEnablePipelineRoutedStore(boolean enablePipelineRoutedStore)
enablePipelineRoutedStore -
public java.lang.String getFailureDetectorImplementation()
public ClientConfig setFailureDetectorImplementation(java.lang.String failureDetectorImplementation)
ThresholdFailureDetector as opposed to using
BannagePeriodFailureDetector
failureDetectorImplementation -
public long getFailureDetectorBannagePeriod()
public ClientConfig setFailureDetectorBannagePeriod(long failureDetectorBannagePeriod)
public int getFailureDetectorThreshold()
public ClientConfig setFailureDetectorThreshold(int failureDetectorThreshold)
failureDetectorThreshold -
public int getFailureDetectorThresholdCountMinimum()
public ClientConfig setFailureDetectorThresholdCountMinimum(int failureDetectorThresholdCountMinimum)
failureDetectorThresholdCountMinimum -
public long getFailureDetectorThresholdInterval()
public ClientConfig setFailureDetectorThresholdInterval(long failureDetectorThresholdIntervalMs)
failureDetectorThresholdIntervalMs -
public long getFailureDetectorAsyncRecoveryInterval()
public ClientConfig setFailureDetectorAsyncRecoveryInterval(long failureDetectorAsyncRecoveryInterval)
failureDetectorAsyncRecoveryInterval -
public java.util.List<java.lang.String> getFailureDetectorCatastrophicErrorTypes()
public ClientConfig setFailureDetectorCatastrophicErrorTypes(java.util.List<java.lang.String> failureDetectorCatastrophicErrorTypes)
failureDetectorCatastrophicErrorTypes -
public long getFailureDetectorRequestLengthThreshold()
public ClientConfig setFailureDetectorRequestLengthThreshold(long failureDetectorRequestLengthThreshold)
failureDetectorRequestLengthThreshold -
public int getMaxBootstrapRetries()
public ClientConfig setMaxBootstrapRetries(int maxBootstrapRetries)
maxBootstrapRetries - Maximum times to retry bootstrapping (must be
>= 1)
java.lang.IllegalArgumentException - If maxBootstrapRetries < 1public java.lang.String getClientContextName()
public ClientConfig setClientContextName(java.lang.String clientContextName)
clientContextName - The name of client contextpublic long getAsyncMetadataRefreshInMs()
public ClientConfig setAsyncMetadataRefreshInMs(long asyncCheckMetadataIntervalMs)
asyncCheckMetadataIntervalMs - The metadata change intervalpublic int getClientRegistryUpdateIntervalInSecs()
public ClientConfig setClientRegistryUpdateIntervalInSecs(int clientRegistryRefrshIntervalInSecs)
clientRegistryRefreshIntervalInSecs - The refresh interval in
secondspublic int getAsyncJobThreadPoolSize()
public ClientConfig setAsyncJobThreadPoolSize(int asyncJobThreadPoolSize)
asyncJobThreadPoolSize - The max # of threads in the async job
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||