Skip to content

Commit

Permalink
Improve documentation of dynamicRefreshSources #2139
Browse files Browse the repository at this point in the history
  • Loading branch information
mp911de committed Nov 22, 2022
1 parent 4d07dfd commit 39a641b
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static ClusterTopologyRefreshOptions.Builder builder() {
/**
* Create a new {@link ClusterTopologyRefreshOptions} using default settings.
*
* @return a new instance of default cluster client client options.
* @return a new instance of default cluster client options.
*/
public static ClusterTopologyRefreshOptions create() {
return builder().build();
Expand All @@ -123,7 +123,7 @@ public static ClusterTopologyRefreshOptions create() {
/**
* Create a new {@link ClusterTopologyRefreshOptions} using default settings with enabled periodic and adaptive refresh.
*
* @return a new instance of default cluster client client options.
* @return a new instance of default cluster client options.
*/
public static ClusterTopologyRefreshOptions enabled() {
return builder().enablePeriodicRefresh().enableAllAdaptiveRefreshTriggers().build();
Expand Down Expand Up @@ -236,10 +236,11 @@ public Builder closeStaleConnections(boolean closeStaleConnections) {

/**
* Discover cluster nodes from topology and use the discovered nodes as source for the cluster topology. Using dynamic
* refresh will query all discovered nodes for the cluster topology and calculate the number of clients for each node.If
* set to {@code false}, only the initial seed nodes will be used as sources for topology discovery and the number of
* clients will be obtained only for the initial seed nodes. This can be useful when using Redis Cluster with many
* nodes. Defaults to {@code true}. See {@link ClusterTopologyRefreshOptions#DEFAULT_DYNAMIC_REFRESH_SOURCES}.
* refresh will query all discovered nodes for the cluster topology and calculate the number of clients for each node.
* If set to {@code false}, only the initial seed nodes will be used as sources for topology discovery and the number of
* clients including response latency will be obtained only for the initial seed nodes. This can be useful when using
* Redis Cluster with many nodes. Defaults to {@code true}. See
* {@link ClusterTopologyRefreshOptions#DEFAULT_DYNAMIC_REFRESH_SOURCES}.
*
* @param dynamicRefreshSources {@code true} to discover and query all cluster nodes for obtaining the cluster topology
* @return {@code this}
Expand Down Expand Up @@ -381,8 +382,8 @@ public Duration getAdaptiveRefreshTimeout() {
}

/**
* Flag, whether to close stale connections when refreshing the cluster topology. Defaults to {@code true}. Comes only
* into effect if {@link #isPeriodicRefreshEnabled()} is {@code true}.
* Flag, whether to close stale connections when refreshing the cluster topology. Defaults to {@code true}. Comes only into
* effect if {@link #isPeriodicRefreshEnabled()} is {@code true}.
*
* @return {@code true} if stale connections are cleaned up after cluster topology updates
*/
Expand All @@ -392,9 +393,11 @@ public boolean isCloseStaleConnections() {

/**
* Discover cluster nodes from topology and use the discovered nodes as source for the cluster topology. Using dynamic
* refresh will query all discovered nodes for the cluster topology and calculate the number of clients for each node.If set
* to {@code false}, only the initial seed nodes will be used as sources for topology discovery and the number of clients
* will be obtained only for the initial seed nodes. This can be useful when using Redis Cluster with many nodes.
* refresh will query all discovered nodes for the cluster topology and calculate the number of clients for each node. If
* set to {@code false}, only the initial seed nodes will be used as sources for topology discovery and the number of
* clients including response latency will be obtained only for the initial seed nodes. This can be useful when using Redis
* Cluster with many nodes. Defaults to {@code true}. See
* {@link ClusterTopologyRefreshOptions#DEFAULT_DYNAMIC_REFRESH_SOURCES}.
*
* @return {@code true} if dynamic refresh sources are enabled
*/
Expand Down

0 comments on commit 39a641b

Please sign in to comment.