DATAREDIS-778 - Align return types of BoundZSetOperations with ZSetOperations.
This is a binary breaking change that requires code using BoundZSetOperations to recompile. Original pull request: #338.
This commit is contained in:
committed by
Mark Paluch
parent
5b21b9e7b9
commit
9b18499b5e
@@ -233,36 +233,44 @@ public interface BoundZSetOperations<K, V> extends BoundKeyOperations<K> {
|
||||
*
|
||||
* @param start
|
||||
* @param end
|
||||
* @return {@literal null} when used in pipeline / transaction.
|
||||
* @see <a href="http://redis.io/commands/zremrangebyrank">Redis Documentation: ZREMRANGEBYRANK</a>
|
||||
*/
|
||||
void removeRange(long start, long end);
|
||||
@Nullable
|
||||
Long removeRange(long start, long end);
|
||||
|
||||
/**
|
||||
* Remove elements with scores between {@code min} and {@code max} from sorted set with the bound key.
|
||||
*
|
||||
* @param min
|
||||
* @param max
|
||||
* @return {@literal null} when used in pipeline / transaction.
|
||||
* @see <a href="http://redis.io/commands/zremrangebyscore">Redis Documentation: ZREMRANGEBYSCORE</a>
|
||||
*/
|
||||
void removeRangeByScore(double min, double max);
|
||||
@Nullable
|
||||
Long removeRangeByScore(double min, double max);
|
||||
|
||||
/**
|
||||
* Union sorted sets at the bound key and {@code otherKeys} and store result in destination {@code destKey}.
|
||||
*
|
||||
* @param otherKey must not be {@literal null}.
|
||||
* @param destKey must not be {@literal null}.
|
||||
* @return {@literal null} when used in pipeline / transaction.
|
||||
* @see <a href="http://redis.io/commands/zunionstore">Redis Documentation: ZUNIONSTORE</a>
|
||||
*/
|
||||
void unionAndStore(K otherKey, K destKey);
|
||||
@Nullable
|
||||
Long unionAndStore(K otherKey, K destKey);
|
||||
|
||||
/**
|
||||
* Union sorted sets at the bound key and {@code otherKeys} and store result in destination {@code destKey}.
|
||||
*
|
||||
* @param otherKeys must not be {@literal null}.
|
||||
* @param destKey must not be {@literal null}.
|
||||
* @return {@literal null} when used in pipeline / transaction.
|
||||
* @see <a href="http://redis.io/commands/zunionstore">Redis Documentation: ZUNIONSTORE</a>
|
||||
*/
|
||||
void unionAndStore(Collection<K> otherKeys, K destKey);
|
||||
@Nullable
|
||||
Long unionAndStore(Collection<K> otherKeys, K destKey);
|
||||
|
||||
/**
|
||||
* Union sorted sets at the bound key and {@code otherKeys} and store result in destination {@code destKey}.
|
||||
@@ -270,10 +278,12 @@ public interface BoundZSetOperations<K, V> extends BoundKeyOperations<K> {
|
||||
* @param otherKeys must not be {@literal null}.
|
||||
* @param destKey must not be {@literal null}.
|
||||
* @param aggregate must not be {@literal null}.
|
||||
* @return {@literal null} when used in pipeline / transaction.
|
||||
* @since 2.1
|
||||
* @see <a href="http://redis.io/commands/zunionstore">Redis Documentation: ZUNIONSTORE</a>
|
||||
*/
|
||||
void unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate);
|
||||
@Nullable
|
||||
Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate);
|
||||
|
||||
/**
|
||||
* Union sorted sets at the bound key and {@code otherKeys} and store result in destination {@code destKey}.
|
||||
@@ -282,28 +292,34 @@ public interface BoundZSetOperations<K, V> extends BoundKeyOperations<K> {
|
||||
* @param destKey must not be {@literal null}.
|
||||
* @param aggregate must not be {@literal null}.
|
||||
* @param weights must not be {@literal null}.
|
||||
* @return {@literal null} when used in pipeline / transaction.
|
||||
* @since 2.1
|
||||
* @see <a href="http://redis.io/commands/zunionstore">Redis Documentation: ZUNIONSTORE</a>
|
||||
*/
|
||||
void unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights);
|
||||
@Nullable
|
||||
Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights);
|
||||
|
||||
/**
|
||||
* Intersect sorted sets at the bound key and {@code otherKey} and store result in destination {@code destKey}.
|
||||
*
|
||||
* @param otherKey must not be {@literal null}.
|
||||
* @param destKey must not be {@literal null}.
|
||||
* @return {@literal null} when used in pipeline / transaction.
|
||||
* @see <a href="http://redis.io/commands/zinterstore">Redis Documentation: ZINTERSTORE</a>
|
||||
*/
|
||||
void intersectAndStore(K otherKey, K destKey);
|
||||
@Nullable
|
||||
Long intersectAndStore(K otherKey, K destKey);
|
||||
|
||||
/**
|
||||
* Intersect sorted sets at the bound key and {@code otherKeys} and store result in destination {@code destKey}.
|
||||
*
|
||||
* @param otherKeys must not be {@literal null}.
|
||||
* @param destKey must not be {@literal null}.
|
||||
* @return {@literal null} when used in pipeline / transaction.
|
||||
* @see <a href="http://redis.io/commands/zinterstore">Redis Documentation: ZINTERSTORE</a>
|
||||
*/
|
||||
void intersectAndStore(Collection<K> otherKeys, K destKey);
|
||||
@Nullable
|
||||
Long intersectAndStore(Collection<K> otherKeys, K destKey);
|
||||
|
||||
/**
|
||||
* Intersect sorted sets at the bound key and {@code otherKeys} and store result in destination {@code destKey}.
|
||||
@@ -311,10 +327,12 @@ public interface BoundZSetOperations<K, V> extends BoundKeyOperations<K> {
|
||||
* @param otherKeys must not be {@literal null}.
|
||||
* @param destKey must not be {@literal null}.
|
||||
* @param aggregate must not be {@literal null}.
|
||||
* @return {@literal null} when used in pipeline / transaction.
|
||||
* @since 2.1
|
||||
* @see <a href="http://redis.io/commands/zinterstore">Redis Documentation: ZINTERSTORE</a>
|
||||
*/
|
||||
void intersectAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate);
|
||||
@Nullable
|
||||
Long intersectAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate);
|
||||
|
||||
/**
|
||||
* Intersect sorted sets at the bound key and {@code otherKeys} and store result in destination {@code destKey}.
|
||||
@@ -323,10 +341,12 @@ public interface BoundZSetOperations<K, V> extends BoundKeyOperations<K> {
|
||||
* @param destKey must not be {@literal null}.
|
||||
* @param aggregate must not be {@literal null}.
|
||||
* @param weights must not be {@literal null}.
|
||||
* @return {@literal null} when used in pipeline / transaction.
|
||||
* @since 2.1
|
||||
* @see <a href="http://redis.io/commands/zinterstore">Redis Documentation: ZINTERSTORE</a>
|
||||
*/
|
||||
void intersectAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights);
|
||||
@Nullable
|
||||
Long intersectAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights);
|
||||
|
||||
/**
|
||||
* Iterate over elements in zset at the bound key. <br />
|
||||
|
||||
@@ -91,8 +91,8 @@ class DefaultBoundZSetOperations<K, V> extends DefaultBoundKeyOperations<K> impl
|
||||
* @see org.springframework.data.redis.core.BoundZSetOperations#intersectAndStore(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void intersectAndStore(K otherKey, K destKey) {
|
||||
ops.intersectAndStore(getKey(), otherKey, destKey);
|
||||
public Long intersectAndStore(K otherKey, K destKey) {
|
||||
return ops.intersectAndStore(getKey(), otherKey, destKey);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -100,8 +100,8 @@ class DefaultBoundZSetOperations<K, V> extends DefaultBoundKeyOperations<K> impl
|
||||
* @see org.springframework.data.redis.core.BoundZSetOperations#intersectAndStore(java.util.Collection, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void intersectAndStore(Collection<K> otherKeys, K destKey) {
|
||||
ops.intersectAndStore(getKey(), otherKeys, destKey);
|
||||
public Long intersectAndStore(Collection<K> otherKeys, K destKey) {
|
||||
return ops.intersectAndStore(getKey(), otherKeys, destKey);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -109,8 +109,8 @@ class DefaultBoundZSetOperations<K, V> extends DefaultBoundKeyOperations<K> impl
|
||||
* @see org.springframework.data.redis.core.BoundZSetOperations#intersectAndStore(java.util.Collection, java.lang.Object, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate)
|
||||
*/
|
||||
@Override
|
||||
public void intersectAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate) {
|
||||
ops.intersectAndStore(getKey(), otherKeys, destKey, aggregate);
|
||||
public Long intersectAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate) {
|
||||
return ops.intersectAndStore(getKey(), otherKeys, destKey, aggregate);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -118,8 +118,8 @@ class DefaultBoundZSetOperations<K, V> extends DefaultBoundKeyOperations<K> impl
|
||||
* @see org.springframework.data.redis.core.BoundZSetOperations#intersectAndStore(java.util.Collection, java.lang.Object, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate, org.springframework.data.redis.connection.RedisZSetCommands.Weights)
|
||||
*/
|
||||
@Override
|
||||
public void intersectAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) {
|
||||
ops.intersectAndStore(getKey(), otherKeys, destKey, aggregate, weights);
|
||||
public Long intersectAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) {
|
||||
return ops.intersectAndStore(getKey(), otherKeys, destKey, aggregate, weights);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -244,8 +244,8 @@ class DefaultBoundZSetOperations<K, V> extends DefaultBoundKeyOperations<K> impl
|
||||
* @see org.springframework.data.redis.core.BoundZSetOperations#removeRange(long, long)
|
||||
*/
|
||||
@Override
|
||||
public void removeRange(long start, long end) {
|
||||
ops.removeRange(getKey(), start, end);
|
||||
public Long removeRange(long start, long end) {
|
||||
return ops.removeRange(getKey(), start, end);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -253,8 +253,8 @@ class DefaultBoundZSetOperations<K, V> extends DefaultBoundKeyOperations<K> impl
|
||||
* @see org.springframework.data.redis.core.BoundZSetOperations#removeRangeByScore(double, double)
|
||||
*/
|
||||
@Override
|
||||
public void removeRangeByScore(double min, double max) {
|
||||
ops.removeRangeByScore(getKey(), min, max);
|
||||
public Long removeRangeByScore(double min, double max) {
|
||||
return ops.removeRangeByScore(getKey(), min, max);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -298,8 +298,8 @@ class DefaultBoundZSetOperations<K, V> extends DefaultBoundKeyOperations<K> impl
|
||||
* @see org.springframework.data.redis.core.BoundZSetOperations#unionAndStore(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void unionAndStore(K otherKey, K destKey) {
|
||||
ops.unionAndStore(getKey(), otherKey, destKey);
|
||||
public Long unionAndStore(K otherKey, K destKey) {
|
||||
return ops.unionAndStore(getKey(), otherKey, destKey);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -307,8 +307,8 @@ class DefaultBoundZSetOperations<K, V> extends DefaultBoundKeyOperations<K> impl
|
||||
* @see org.springframework.data.redis.core.BoundZSetOperations#unionAndStore(java.util.Collection, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void unionAndStore(Collection<K> otherKeys, K destKey) {
|
||||
ops.unionAndStore(getKey(), otherKeys, destKey);
|
||||
public Long unionAndStore(Collection<K> otherKeys, K destKey) {
|
||||
return ops.unionAndStore(getKey(), otherKeys, destKey);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -316,8 +316,8 @@ class DefaultBoundZSetOperations<K, V> extends DefaultBoundKeyOperations<K> impl
|
||||
* @see org.springframework.data.redis.core.BoundZSetOperations#unionAndStore(java.util.Collection, java.lang.Object, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate)
|
||||
*/
|
||||
@Override
|
||||
public void unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate) {
|
||||
ops.unionAndStore(getKey(), otherKeys, destKey, aggregate);
|
||||
public Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate) {
|
||||
return ops.unionAndStore(getKey(), otherKeys, destKey, aggregate);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -325,8 +325,8 @@ class DefaultBoundZSetOperations<K, V> extends DefaultBoundKeyOperations<K> impl
|
||||
* @see org.springframework.data.redis.core.BoundZSetOperations#unionAndStore(java.util.Collection, java.lang.Object, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate, org.springframework.data.redis.connection.RedisZSetCommands.Weights)
|
||||
*/
|
||||
@Override
|
||||
public void unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) {
|
||||
ops.unionAndStore(getKey(), otherKeys, destKey, aggregate, weights);
|
||||
public Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) {
|
||||
return ops.unionAndStore(getKey(), otherKeys, destKey, aggregate, weights);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user