Package com.couchbase.client.core.env
Class KeyValueServiceConfig
- java.lang.Object
-
- com.couchbase.client.core.env.AbstractServiceConfig
-
- com.couchbase.client.core.env.KeyValueServiceConfig
-
public final class KeyValueServiceConfig extends AbstractServiceConfig
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KeyValueServiceConfig
create(int endpoints)
Creates a new configuration for the KV service.String
toString()
-
Methods inherited from class com.couchbase.client.core.env.AbstractServiceConfig
checkIdleTime, idleTime, isPipelined, maxEndpoints, minEndpoints
-
-
-
-
Method Detail
-
create
public static KeyValueServiceConfig create(int endpoints)
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
public String toString()
- Overrides:
toString
in classAbstractServiceConfig
-
-