public abstract class AbstractServiceConfig extends Object
Service
.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_IDLE_TIME
The default idle time for pooled services.
|
static int |
NO_IDLE_TIME
Constant to use if no idle time should be used.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractServiceConfig(int minEndpoints,
int maxEndpoints,
boolean pipelined,
int idleTime)
Creates a new service config.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkIdleTime(int idleTime)
Helper method to check if the idle time is within proper range.
|
int |
idleTime()
The time in seconds (minimum, approx) after when idle the socket will be closed.
|
boolean |
isPipelined()
If this service is pipelined (more than one request at the same time on the
same socket).
|
int |
maxEndpoints()
The maximum endpoints per node which will be established.
|
int |
minEndpoints()
The minimum endpoints per node which will always be established.
|
String |
toString() |
public static final int NO_IDLE_TIME
public static final int DEFAULT_IDLE_TIME
protected AbstractServiceConfig(int minEndpoints, int maxEndpoints, boolean pipelined, int idleTime)
minEndpoints
- minimum number of endpoints to be usedmaxEndpoints
- maximum number of endpoints to be usedpipelined
- if this is a pipelined service.idleTime
- the configured idle timeprotected void checkIdleTime(int idleTime)
idleTime
- the idle time to check.public int minEndpoints()
public int maxEndpoints()
public boolean isPipelined()
public int idleTime()
Copyright © 2018 Couchbase, Inc.. All rights reserved.