Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mp911de committed Jul 20, 2015
1 parent e50b27a commit 1818ee1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.lambdaworks.redis.cluster;

import java.util.function.Predicate;

import com.lambdaworks.redis.RedisClusterAsyncConnection;
import com.lambdaworks.redis.cluster.api.NodeSelection;
import com.lambdaworks.redis.RedisException;
import com.lambdaworks.redis.cluster.api.StatefulRedisClusterConnection;
import com.lambdaworks.redis.cluster.models.partitions.RedisClusterNode;

/**
* Advanced asynchronous and thread-safe cluster API.
Expand All @@ -20,21 +17,30 @@ public interface RedisAdvancedClusterAsyncConnection<K, V> extends RedisClusterA
/**
* Retrieve a connection to the specified cluster node using the nodeId. Host and port are looked up in the node list.
*
* Do not close the connections. Otherwise, unpredictable behavior will occur. The nodeId must be part of the cluster and is
* validated against the current topology view in {@link com.lambdaworks.redis.cluster.models.partitions.Partitions}.
*
* In contrast to the {@link RedisAdvancedClusterAsyncConnection}, node-connections do not route commands to other cluster
* nodes
*
* @param nodeId the node Id
* @return a connection to the requested cluster node
* @throws RedisException if the requested node identified by {@code nodeId} is not part of the cluster
*/
RedisClusterAsyncConnection<K, V> getConnection(String nodeId);

/**
* Retrieve a connection to the specified cluster node using the nodeId. In contrast to the
* {@link RedisAdvancedClusterAsyncConnection}, node-connections do not route commands to other cluster nodes
* Retrieve a connection to the specified cluster node using the nodeId. Do not close the connections. Otherwise,
* unpredictable behavior will occur. The node must be part of the cluster and host/port are validated (exact check) against
* the current topology view in {@link com.lambdaworks.redis.cluster.models.partitions.Partitions}.
*
* In contrast to the {@link RedisAdvancedClusterAsyncConnection}, node-connections do not route commands to other cluster
* nodes.
*
* @param host the host
* @param port the port
* @return a connection to the requested cluster node
* @throws RedisException if the requested node identified by {@code host} and {@code port} is not part of the cluster
*/
RedisClusterAsyncConnection<K, V> getConnection(String host, int port);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
package com.lambdaworks.redis.cluster;

import java.util.function.Predicate;

import com.lambdaworks.redis.RedisClusterConnection;
import com.lambdaworks.redis.RedisFuture;
import com.lambdaworks.redis.RedisException;
import com.lambdaworks.redis.cluster.api.StatefulRedisClusterConnection;
import com.lambdaworks.redis.cluster.models.partitions.Partitions;
import com.lambdaworks.redis.cluster.models.partitions.RedisClusterNode;

/**
* Advanced synchronous and thread-safe cluster API.
Expand All @@ -19,21 +15,30 @@
public interface RedisAdvancedClusterConnection<K, V> extends RedisClusterConnection<K, V> {

/**
* Retrieve a connection to the specified cluster node using the nodeId. Host and port are looked up in the node list. In
* contrast to the {@link RedisAdvancedClusterConnection}, node-connections do not route commands to other cluster nodes
* Retrieve a connection to the specified cluster node using the nodeId. Host and port are looked up in the node list.
*
* Do not close the connections. Otherwise, unpredictable behavior will occur. The nodeId must be part of the cluster and is
* validated against the current topology view in {@link com.lambdaworks.redis.cluster.models.partitions.Partitions}.
*
* In contrast to the {@link RedisAdvancedClusterConnection}, node-connections do not route commands to other cluster nodes.
*
* @param nodeId the node Id
* @return a connection to the requested cluster node
* @throws RedisException if the requested node identified by {@code nodeId} is not part of the cluster
*/
RedisClusterConnection<K, V> getConnection(String nodeId);

/**
* Retrieve a connection to the specified cluster node using the nodeId. In contrast to the
* {@link RedisAdvancedClusterConnection}, node-connections do not route commands to other cluster nodes
* Retrieve a connection to the specified cluster node using the nodeId. Do not close the connections. Otherwise,
* unpredictable behavior will occur. The node must be part of the cluster and host/port are validated (exact check) against
* the current topology view in {@link com.lambdaworks.redis.cluster.models.partitions.Partitions}.
*
* In contrast to the {@link RedisAdvancedClusterConnection}, node-connections do not route commands to other cluster nodes.
*
* @param host the host
* @param port the port
* @return a connection to the requested cluster node
* @throws RedisException if the requested node identified by {@code host} and {@code port} is not part of the cluster
*/
RedisClusterConnection<K, V> getConnection(String host, int port);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.lambdaworks.redis.cluster.api;

import com.lambdaworks.redis.RedisException;
import com.lambdaworks.redis.api.StatefulConnection;
import com.lambdaworks.redis.api.StatefulRedisConnection;
import com.lambdaworks.redis.cluster.RedisAdvancedClusterAsyncConnection;
Expand Down Expand Up @@ -43,21 +44,32 @@ public interface StatefulRedisClusterConnection<K, V> extends StatefulConnection
RedisAdvancedClusterReactiveCommands<K, V> reactive();

/**
* Retrieve a stateful connection to the specified cluster node using the nodeId. Host and port are looked up in the node
* list. In contrast to the RedisAdvancedClusterConnection, node-connections do not route commands to other cluster nodes.
*
* Retrieve a connection to the specified cluster node using the nodeId. Host and port are looked up in the node list.
*
* Do not close the connections. Otherwise, unpredictable behavior will occur. The nodeId must be part of the cluster and is
* validated against the current topology view in {@link com.lambdaworks.redis.cluster.models.partitions.Partitions}.
*
* In contrast to the {@link StatefulRedisClusterConnection}, node-connections do not route commands to other cluster
* nodes.
*
* @param nodeId the node Id
* @return a connection to the requested cluster node
* @throws RedisException if the requested node identified by {@code nodeId} is not part of the cluster
*/
StatefulRedisConnection<K, V> getConnection(String nodeId);

/**
* Retrieve a stateful connection to the specified cluster node using the nodeId. In contrast to the
* RedisAdvancedClusterConnection, node-connections do not route commands to other cluster nodes.
* Retrieve a connection to the specified cluster node using the nodeId. Do not close the connections. Otherwise,
* unpredictable behavior will occur. The node must be part of the cluster and host/port are validated (exact check) against
* the current topology view in {@link com.lambdaworks.redis.cluster.models.partitions.Partitions}.
*
* In contrast to the {@link StatefulRedisClusterConnection}, node-connections do not route commands to other cluster
* nodes.
*
* @param host the host
* @param port the port
* @return a connection to the requested cluster node
* @throws RedisException if the requested node identified by {@code host} and {@code port} is not part of the cluster
*/
StatefulRedisConnection<K, V> getConnection(String host, int port);

Expand Down

0 comments on commit 1818ee1

Please sign in to comment.