Package com.couchbase.client.core.env
Class AnalyticsServiceConfig
- java.lang.Object
-
- com.couchbase.client.core.env.AbstractServiceConfig
-
- com.couchbase.client.core.env.AnalyticsServiceConfig
-
public final class AnalyticsServiceConfig extends AbstractServiceConfig
Allows to configure a Analytics Service on a per-node basis.- Since:
- 1.6.0
- 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 AnalyticsServiceConfig
create(int minEndpoints, int maxEndpoints)
Creates aAnalyticsServiceConfig
with the default idle time.static AnalyticsServiceConfig
create(int minEndpoints, int maxEndpoints, int idleTime)
Creates aAnalyticsServiceConfig
with a custom idle time.String
toString()
-
Methods inherited from class com.couchbase.client.core.env.AbstractServiceConfig
checkIdleTime, idleTime, isPipelined, maxEndpoints, minEndpoints
-
-
-
-
Method Detail
-
create
public static AnalyticsServiceConfig create(int minEndpoints, int maxEndpoints)
Creates aAnalyticsServiceConfig
with the default idle time. This constructor creates a config with theAbstractServiceConfig.DEFAULT_IDLE_TIME
. It allows to configure both the minimum number of endpoints per node to be present at every point in time as well as the allowed maximum. If an endpoint is idle longer than the configured idle time and the service pool does not fall below the configured minimum, it is removed from the pool.- Parameters:
minEndpoints
- minimum number of endpoints to be usedmaxEndpoints
- maximum number of endpoints to be used- Returns:
- the created
AnalyticsServiceConfig
.
-
create
public static AnalyticsServiceConfig create(int minEndpoints, int maxEndpoints, int idleTime)
Creates aAnalyticsServiceConfig
with a custom idle time. This constructor creates a config with a custom idle timeout. It allows to configure both the minimum number of endpoints per node to be present at every point in time as well as the allowed maximum. If an endpoint is idle longer than the configured idle time and the service pool does not fall below the configured minimum, it is removed from the pool.- Parameters:
minEndpoints
- minimum number of endpoints to be usedmaxEndpoints
- maximum number of endpoints to be usedidleTime
- the configured idle time- Returns:
- the created
AnalyticsServiceConfig
.
-
toString
public String toString()
- Overrides:
toString
in classAbstractServiceConfig
-
-