Skip to content

Commit

Permalink
Expose Geo command API in the Cluster API #154
Browse files Browse the repository at this point in the history
The Cluster APIs (deprecated Connection API and regular Command API) did not declare the Geo commands/connection interface in the extension list. Altough the Geo commands were available on the async/reactive API (because the API object implements all Geo methods) the API was not exposed and the Geo methods were not usable. This commit adds the GeoCommands/GeoConnection interfaces to the cluster commands/connection interfaces.
  • Loading branch information
mp911de committed Nov 18, 2015
1 parent 3b82818 commit 9c8ef63
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public interface RedisClusterAsyncConnection<K, V> extends RedisHashesAsyncConnection<K, V>, RedisKeysAsyncConnection<K, V>,
RedisStringsAsyncConnection<K, V>, RedisListsAsyncConnection<K, V>, RedisSetsAsyncConnection<K, V>,
RedisSortedSetsAsyncConnection<K, V>, RedisScriptingAsyncConnection<K, V>, RedisServerAsyncConnection<K, V>,
RedisHLLAsyncConnection<K, V>, BaseRedisAsyncConnection<K, V> {
RedisHLLAsyncConnection<K, V>, RedisGeoAsyncConnection<K, V>, BaseRedisAsyncConnection<K, V> {

/**
* Set the default timeout for operations.
Expand Down Expand Up @@ -126,7 +126,8 @@ public interface RedisClusterAsyncConnection<K, V> extends RedisHashesAsyncConne
* {@link com.lambdaworks.redis.cluster.models.partitions.ClusterPartitionParser#parse}
*
* @param nodeId node id of the master node
* @return List&lt;String&gt; array-reply list of slaves. The command returns data in the same format as {@link #clusterNodes()} but one line per slave.
* @return List&lt;String&gt; array-reply list of slaves. The command returns data in the same format as
* {@link #clusterNodes()} but one line per slave.
*/
RedisFuture<List<String>> clusterSlaves(String nodeId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import java.util.List;
import java.util.concurrent.TimeUnit;

import com.lambdaworks.redis.api.sync.*;

/**
* A complete synchronous and thread-safe cluster Redis API with 400+ Methods.
*
Expand All @@ -17,7 +15,8 @@
@Deprecated
public interface RedisClusterConnection<K, V> extends RedisHashesConnection<K, V>, RedisKeysConnection<K, V>,
RedisStringsConnection<K, V>, RedisListsConnection<K, V>, RedisSetsConnection<K, V>, RedisSortedSetsConnection<K, V>,
RedisScriptingConnection<K, V>, RedisServerConnection<K, V>, RedisHLLConnection<K, V>, AutoCloseable {
RedisScriptingConnection<K, V>, RedisServerConnection<K, V>, RedisHLLConnection<K, V>, RedisGeoConnection<K, V>,
AutoCloseable {

/**
* Set the default timeout for operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
public interface RedisClusterAsyncCommands<K, V> extends RedisHashAsyncCommands<K, V>, RedisKeyAsyncCommands<K, V>,
RedisStringAsyncCommands<K, V>, RedisListAsyncCommands<K, V>, RedisSetAsyncCommands<K, V>,
RedisSortedSetAsyncCommands<K, V>, RedisScriptingAsyncCommands<K, V>, RedisServerAsyncCommands<K, V>,
RedisHLLAsyncCommands<K, V>, BaseRedisAsyncCommands<K, V>, RedisClusterAsyncConnection<K, V> {
RedisHLLAsyncCommands<K, V>, RedisGeoAsyncCommands<K, V>, BaseRedisAsyncCommands<K, V>,
RedisClusterAsyncConnection<K, V> {

/**
* Set the default timeout for operations.
Expand Down Expand Up @@ -127,7 +128,8 @@ public interface RedisClusterAsyncCommands<K, V> extends RedisHashAsyncCommands<
* {@link com.lambdaworks.redis.cluster.models.partitions.ClusterPartitionParser#parse}
*
* @param nodeId node id of the master node
* @return List&lt;String&gt; array-reply list of slaves. The command returns data in the same format as {@link #clusterNodes()} but one line per slave.
* @return List&lt;String&gt; array-reply list of slaves. The command returns data in the same format as
* {@link #clusterNodes()} but one line per slave.
*/
RedisFuture<List<String>> clusterSlaves(String nodeId);

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

import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import com.lambdaworks.redis.RedisFuture;
import rx.Observable;

import com.lambdaworks.redis.api.rx.BaseRedisReactiveCommands;
import com.lambdaworks.redis.api.rx.RedisHLLReactiveCommands;
import com.lambdaworks.redis.api.rx.RedisHashReactiveCommands;
import com.lambdaworks.redis.api.rx.RedisKeyReactiveCommands;
import com.lambdaworks.redis.api.rx.RedisListReactiveCommands;
import com.lambdaworks.redis.api.rx.RedisScriptingReactiveCommands;
import com.lambdaworks.redis.api.rx.RedisServerReactiveCommands;
import com.lambdaworks.redis.api.rx.RedisSetReactiveCommands;
import com.lambdaworks.redis.api.rx.RedisSortedSetReactiveCommands;
import com.lambdaworks.redis.api.rx.RedisStringReactiveCommands;
import com.lambdaworks.redis.api.rx.*;

/**
* A complete reactive and thread-safe cluster Redis API with 400+ Methods.
Expand All @@ -29,7 +18,7 @@
public interface RedisClusterReactiveCommands<K, V> extends RedisHashReactiveCommands<K, V>, RedisKeyReactiveCommands<K, V>,
RedisStringReactiveCommands<K, V>, RedisListReactiveCommands<K, V>, RedisSetReactiveCommands<K, V>,
RedisSortedSetReactiveCommands<K, V>, RedisScriptingReactiveCommands<K, V>, RedisServerReactiveCommands<K, V>,
RedisHLLReactiveCommands<K, V>, BaseRedisReactiveCommands<K, V> {
RedisHLLReactiveCommands<K, V>, RedisGeoReactiveCommands<K, V>, BaseRedisReactiveCommands<K, V> {

/**
* Set the default timeout for operations.
Expand Down Expand Up @@ -137,7 +126,8 @@ public interface RedisClusterReactiveCommands<K, V> extends RedisHashReactiveCom
* {@link com.lambdaworks.redis.cluster.models.partitions.ClusterPartitionParser#parse}
*
* @param nodeId node id of the master node
* @return List&lt;String&gt; array-reply list of slaves. The command returns data in the same format as {@link #clusterNodes()} but one line per slave.
* @return List&lt;String&gt; array-reply list of slaves. The command returns data in the same format as
* {@link #clusterNodes()} but one line per slave.
*/
Observable<String> clusterSlaves(String nodeId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@
import java.util.concurrent.TimeUnit;

import com.lambdaworks.redis.RedisClusterConnection;
import com.lambdaworks.redis.api.sync.RedisHLLCommands;
import com.lambdaworks.redis.api.sync.RedisHashCommands;
import com.lambdaworks.redis.api.sync.RedisKeyCommands;
import com.lambdaworks.redis.api.sync.RedisListCommands;
import com.lambdaworks.redis.api.sync.RedisScriptingCommands;
import com.lambdaworks.redis.api.sync.RedisServerCommands;
import com.lambdaworks.redis.api.sync.RedisSetCommands;
import com.lambdaworks.redis.api.sync.RedisSortedSetCommands;
import com.lambdaworks.redis.api.sync.RedisStringCommands;
import com.lambdaworks.redis.api.sync.*;

/**
* A complete synchronous and thread-safe Redis Cluster API with 400+ Methods.
Expand All @@ -24,7 +16,7 @@
*/
public interface RedisClusterCommands<K, V> extends RedisHashCommands<K, V>, RedisKeyCommands<K, V>, RedisStringCommands<K, V>,
RedisListCommands<K, V>, RedisSetCommands<K, V>, RedisSortedSetCommands<K, V>, RedisScriptingCommands<K, V>,
RedisServerCommands<K, V>, RedisHLLCommands<K, V>, AutoCloseable, RedisClusterConnection<K, V> {
RedisServerCommands<K, V>, RedisHLLCommands<K, V>, RedisGeoCommands<K, V>, AutoCloseable, RedisClusterConnection<K, V> {

/**
* Set the default timeout for operations.
Expand Down

0 comments on commit 9c8ef63

Please sign in to comment.