RedissonSetMultimapValues.removeRandom added

pull/727/head
Nikita 8 years ago
parent 08726b1e0b
commit dc8b5db505

@ -243,6 +243,16 @@ public class RedissonSetMultimapValues<V> extends RedissonExpirable implements R
return commandExecutor.writeAsync(getName(), codec, RedisCommands.SPOP_SINGLE, getName());
}
@Override
public Set<V> removeRandom(int amount) {
return get(removeRandomAsync(amount));
}
@Override
public RFuture<Set<V>> removeRandomAsync(int amount) {
return commandExecutor.writeAsync(getName(), codec, RedisCommands.SPOP, getName(), amount);
}
@Override
public V random() {
return get(randomAsync());

Loading…
Cancel
Save