Package com.couchbase.client.core.env
Class KeyValueServiceConfig
java.lang.Object
com.couchbase.client.core.env.AbstractServiceConfig
com.couchbase.client.core.env.KeyValueServiceConfig
Allows to configure a KV Service on a per-node basis.
- Since:
- 1.4.2
- Author:
- Michael Nitschinger
-
Field Summary
Fields inherited from class com.couchbase.client.core.env.AbstractServiceConfig
DEFAULT_IDLE_TIME, NO_IDLE_TIME
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeyValueServiceConfig
create
(int endpoints) Creates a new configuration for the KV service.toString()
Methods inherited from class com.couchbase.client.core.env.AbstractServiceConfig
checkIdleTime, idleTime, isPipelined, maxEndpoints, minEndpoints
-
Method Details
-
create
Creates a new configuration for the KV service. Note that because the KV service does not support dynamic pooling, only a fixed number of endpoints per node can be provided. KV connections are expensive to create and should be reused as much as possible. As a rule of thumb, the default ofDefaultCoreEnvironment.KEYVALUE_ENDPOINTS
provides the best performance. If the load is very spiky and comes in batches, then increasing the number of endpoints can help to "drain the pipe" faster but comes at the cost of keeping more connections open.- Parameters:
endpoints
- the number of endpoints (sockets) per node, fixed.- Returns:
- the created
KeyValueServiceConfig
.
-
toString
- Overrides:
toString
in classAbstractServiceConfig
-