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 Predicate<RedisClusterNode> |
DEFAULT_NODE_FILTER |
static ReadOnlyCommands.ReadOnlyPredicate |
DEFAULT_READ_ONLY_COMMANDS |
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_PROTOCOL_VERSION, DEFAULT_PUBLISH_ON_SCHEDULER, DEFAULT_REQUEST_QUEUE_SIZE, DEFAULT_SCRIPT_CHARSET, 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.
|
Predicate<RedisClusterNode> |
getNodeFilter()
The
node filter to filter Redis Cluster nodes from
Partitions . |
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, getConfiguredProtocolVersion, getDecodeBufferPolicy, getDisconnectedBehavior, getProtocolVersion, getReadOnlyCommands, getRequestQueueSize, getScriptCharset, getSocketOptions, getSslOptions, getTimeoutOptions, isAutoReconnect, isCancelCommandsOnReconnectFailure, isPingBeforeActivateConnection, isPublishOnScheduler, isSuspendReconnectOnProtocolFailure
public static final boolean DEFAULT_CLOSE_STALE_CONNECTIONS
public static final ReadOnlyCommands.ReadOnlyPredicate DEFAULT_READ_ONLY_COMMANDS
public static final int DEFAULT_MAX_REDIRECTS
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_VALIDATE_CLUSTER_MEMBERSHIP
public static final Predicate<RedisClusterNode> DEFAULT_NODE_FILTER
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 isCloseStaleConnections()
true
. Comes only into
effect if isRefreshClusterView()
is true
. Returns the value from ClusterTopologyRefreshOptions
if provided.true
if stale connections are cleaned up after cluster topology updatespublic int getMaxRedirects()
DEFAULT_MAX_REDIRECTS
.public boolean isRefreshClusterView()
getRefreshPeriod()
. Defaults to false
. Returns the value from
ClusterTopologyRefreshOptions
if provided.true
it the cluster topology view is updated periodicallypublic Duration getRefreshPeriod()
ClusterTopologyRefreshOptions
if provided.public ClusterTopologyRefreshOptions getTopologyRefreshOptions()
ClusterTopologyRefreshOptions
for detailed control of topology updates.ClusterTopologyRefreshOptions
.public boolean isValidateClusterNodeMembership()
true
.true
if validation is enabled.public Predicate<RedisClusterNode> getNodeFilter()
node filter
to filter Redis Cluster nodes from
Partitions
.node filter
to filter Redis Cluster nodes from
Partitions
.Copyright © 2023 lettuce.io. All rights reserved.