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 Duration |
DEFAULT_REFRESH_PERIOD_DURATION |
static boolean |
DEFAULT_VALIDATE_CLUSTER_MEMBERSHIP |
DEFAULT_AUTO_RECONNECT, DEFAULT_BUFFER_USAGE_RATIO, DEFAULT_CANCEL_CMD_RECONNECT_FAIL, DEFAULT_DISCONNECTED_BEHAVIOR, DEFAULT_PING_BEFORE_ACTIVATE_CONNECTION, DEFAULT_PUBLISH_ON_SCHEDULER, DEFAULT_REQUEST_QUEUE_SIZE, DEFAULT_SOCKET_OPTIONS, DEFAULT_SSL_OPTIONS, DEFAULT_SUSPEND_RECONNECT_PROTO_FAIL, DEFAULT_TIMEOUT_OPTIONS
Modifier | Constructor and Description |
---|---|
protected |
ClusterClientOptions(ClusterClientOptions.Builder builder) |
protected |
ClusterClientOptions(ClusterClientOptions original) |
Modifier and Type | Method and Description |
---|---|
static ClusterClientOptions.Builder |
builder()
Returns a new
ClusterClientOptions.Builder to construct ClusterClientOptions . |
static ClusterClientOptions.Builder |
builder(ClientOptions clientOptions)
Returns a new
ClusterClientOptions.Builder initialized from ClientOptions to construct
ClusterClientOptions . |
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.
|
Duration |
getRefreshPeriod()
Period between the regular cluster topology updates.
|
ClusterTopologyRefreshOptions |
getTopologyRefreshOptions()
The
ClusterTopologyRefreshOptions for detailed control of topology updates. |
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.
|
ClusterClientOptions.Builder |
mutate()
Returns a builder to create new
ClusterClientOptions whose settings are replicated from the current
ClusterClientOptions . |
copyOf, getBufferUsageRatio, getDisconnectedBehavior, getRequestQueueSize, getSocketOptions, getSslOptions, getTimeoutOptions, isAutoReconnect, isCancelCommandsOnReconnectFailure, isPingBeforeActivateConnection, isPublishOnScheduler, isSuspendReconnectOnProtocolFailure
public static final boolean DEFAULT_REFRESH_CLUSTER_VIEW
public static final long DEFAULT_REFRESH_PERIOD
public static final Duration DEFAULT_REFRESH_PERIOD_DURATION
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 static ClusterClientOptions.Builder builder()
ClusterClientOptions.Builder
to construct ClusterClientOptions
.ClusterClientOptions.Builder
to construct ClusterClientOptions
.public static ClusterClientOptions.Builder builder(ClientOptions clientOptions)
ClusterClientOptions.Builder
initialized from ClientOptions
to construct
ClusterClientOptions
.ClusterClientOptions.Builder
to construct ClusterClientOptions
.public static ClusterClientOptions create()
ClusterClientOptions
using default settings.public ClusterClientOptions.Builder mutate()
ClusterClientOptions
whose settings are replicated from the current
ClusterClientOptions
.mutate
in class ClientOptions
ClusterClientOptions.Builder
to create new ClusterClientOptions
whose settings are replicated
from the current ClusterClientOptions
.public boolean isRefreshClusterView()
getRefreshPeriod()
. Defaults to false. Returns the value from
ClusterTopologyRefreshOptions
if provided.public Duration getRefreshPeriod()
ClusterTopologyRefreshOptions
if provided.public boolean isCloseStaleConnections()
isRefreshClusterView()
is true. Returns the value from
ClusterTopologyRefreshOptions
if provided.public boolean isValidateClusterNodeMembership()
public int getMaxRedirects()
DEFAULT_MAX_REDIRECTS
.public ClusterTopologyRefreshOptions getTopologyRefreshOptions()
ClusterTopologyRefreshOptions
for detailed control of topology updates.ClusterTopologyRefreshOptions
.Copyright © 2019 lettuce.io. All rights reserved.