public class ClusterClientOptions extends ClientOptions
RedisClusterClient
.Modifier and Type | Class and Description |
---|---|
static class |
ClusterClientOptions.Builder
Builder for
ClusterClientOptions . |
ClientOptions.DisconnectedBehavior
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_CLOSE_STALE_CONNECTIONS |
static int |
DEFAULT_MAX_REDIRECTS |
static boolean |
DEFAULT_REFRESH_CLUSTER_VIEW |
static long |
DEFAULT_REFRESH_PERIOD |
static TimeUnit |
DEFAULT_REFRESH_PERIOD_UNIT |
static boolean |
DEFAULT_VALIDATE_CLUSTER_MEMBERSHIP |
DEFAULT_AUTO_RECONNECT, DEFAULT_CANCEL_CMD_RECONNECT_FAIL, DEFAULT_DISCONNECTED_BEHAVIOR, DEFAULT_PING_BEFORE_ACTIVATE_CONNECTION, DEFAULT_REQUEST_QUEUE_SIZE, DEFAULT_SUSPEND_RECONNECT_PROTO_FAIL
Modifier | Constructor and Description |
---|---|
protected |
ClusterClientOptions(ClusterClientOptions.Builder builder) |
protected |
ClusterClientOptions(ClusterClientOptions original) |
Modifier and Type | Method and Description |
---|---|
static ClusterClientOptions |
copyOf(ClusterClientOptions options)
Create a copy of options.
|
static ClusterClientOptions |
create()
Create a new
ClusterClientOptions using default settings. |
int |
getMaxRedirects()
Number of maximal of cluster redirects (-MOVED and -ASK) to follow in case a key was moved from one
node to another node.
|
long |
getRefreshPeriod()
Period between the regular cluster topology updates.
|
TimeUnit |
getRefreshPeriodUnit()
Unit for the
getRefreshPeriod() . |
boolean |
isCloseStaleConnections()
Flag, whether to close stale connections when refreshing the cluster topology.
|
boolean |
isRefreshClusterView()
Flag, whether regular cluster topology updates are updated.
|
boolean |
isValidateClusterNodeMembership()
Validate the cluster node membership before allowing connections to a cluster node.
|
copyOf, getDisconnectedBehavior, getRequestQueueSize, isAutoReconnect, isCancelCommandsOnReconnectFailure, isPingBeforeActivateConnection, isSuspendReconnectOnProtocolFailure
public static final boolean DEFAULT_REFRESH_CLUSTER_VIEW
public static final long DEFAULT_REFRESH_PERIOD
public static final TimeUnit DEFAULT_REFRESH_PERIOD_UNIT
public static final boolean DEFAULT_CLOSE_STALE_CONNECTIONS
public static final boolean DEFAULT_VALIDATE_CLUSTER_MEMBERSHIP
public static final int DEFAULT_MAX_REDIRECTS
protected ClusterClientOptions(ClusterClientOptions.Builder builder)
protected ClusterClientOptions(ClusterClientOptions original)
public static ClusterClientOptions copyOf(ClusterClientOptions options)
options
- the originalClusterClientOptions
containing the values of optionspublic boolean isRefreshClusterView()
getRefreshPeriod()
/getRefreshPeriodUnit()
. Defaults to false.public long getRefreshPeriod()
public TimeUnit getRefreshPeriodUnit()
getRefreshPeriod()
. Defaults to TimeUnit.SECONDS
.getRefreshPeriod()
public boolean isCloseStaleConnections()
isRefreshClusterView()
is true.public boolean isValidateClusterNodeMembership()
public int getMaxRedirects()
DEFAULT_MAX_REDIRECTS
.public static ClusterClientOptions create()
ClusterClientOptions
using default settings.Copyright © 2016. All rights reserved.