public final class AsyncClientPolicy extends ClientPolicy
Modifier and Type | Field and Description |
---|---|
MaxCommandAction |
asyncMaxCommandAction
How to handle cases when the asynchronous maximum number of concurrent connections
have been reached.
|
int |
asyncMaxCommands
Maximum number of concurrent asynchronous commands that are active at any point in time.
|
int |
asyncSelectorThreads
Number of selector threads used to process asynchronous network events.
|
int |
asyncSelectorTimeout
Maximum milliseconds to wait for an asynchronous network selector event.
|
ExecutorService |
asyncTaskThreadPool
Asynchronous socket read/user callback task thread pool.
|
batchPolicyDefault, failIfNotConnected, ipMap, maxSocketIdle, maxThreads, password, queryPolicyDefault, readPolicyDefault, scanPolicyDefault, sharedThreadPool, tendInterval, threadPool, timeout, user, writePolicyDefault
Constructor and Description |
---|
AsyncClientPolicy() |
public MaxCommandAction asyncMaxCommandAction
public int asyncMaxCommands
max open connections = asyncMaxCommands *
The maximum open connections should not exceed the total socket file descriptors available on the client machine. The socket file descriptors available can be determined by the following command:
ulimit -n
public int asyncSelectorTimeout
public int asyncSelectorThreads
public ExecutorService asyncTaskThreadPool
asyncTaskThreadPool = Executors.newCachedThreadPool(new ThreadFactory() { public final Thread newThread(Runnable runnable) { Thread thread = new Thread(runnable); thread.setDaemon(true); return thread; } });Daemon threads automatically terminate when the program terminates.
The default, null, indicates asynchronous tasks should be run in the same thread as the selector.
Copyright © 2012–2014 Aerospike, Inc. All rights reserved.