|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aerospike.client.policy.ClientPolicy
public class ClientPolicy
Container object for client policy Command.
Field Summary | |
---|---|
boolean |
failIfNotConnected
Throw exception if host connection fails during addHost(). |
int |
maxSocketIdle
Maximum socket idle in seconds. |
int |
maxThreads
Estimate of incoming threads concurrently using synchronous methods in the client instance. |
boolean |
sharedThreadPool
Is threadPool shared between other client instances or classes. |
ExecutorService |
threadPool
Underlying thread pool used in batch, scan, and query commands. |
int |
timeout
Initial host connection timeout in milliseconds. |
Constructor Summary | |
---|---|
ClientPolicy()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int timeout
public int maxThreads
public int maxSocketIdle
public boolean failIfNotConnected
public ExecutorService threadPool
threadPool = 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.
public boolean sharedThreadPool
If threadPool is shared, threadPool will not be shutdown when the client instance is closed. This shared threadPool should be shutdown manually before the program terminates. Shutdown is recommended, but not absolutely required if threadPool is constructed to use daemon threads.
Constructor Detail |
---|
public ClientPolicy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |