Merge branch 'master' into 3.0.0

pull/1821/head
Nikita Koksharov 6 years ago
commit 4774e48c4e

@ -430,4 +430,20 @@ public interface RScoredSortedSetRx<V> extends RExpirableRx, RSortableRx<Set<V>>
*/ */
Flowable<V> takeLast(); Flowable<V> takeLast();
/**
* Retrieves and removes continues stream of elements from the head.
* Waits for next element become available.
*
* @return stream of head elements
*/
Flowable<V> takeFirstElements();
/**
* Retrieves and removes continues stream of elements from the tail.
* Waits for next element become available.
*
* @return stream of tail elements
*/
Flowable<V> takeLastElements();
} }

@ -48,7 +48,7 @@ public class RedissonScoredSortedSetRx<V> {
}.create(); }.create();
} }
public Flowable<V> takeFirst() { public Flowable<V> takeFirstElements() {
return ElementsStream.takeElements(new Callable<RFuture<V>>() { return ElementsStream.takeElements(new Callable<RFuture<V>>() {
@Override @Override
public RFuture<V> call() throws Exception { public RFuture<V> call() throws Exception {
@ -57,7 +57,7 @@ public class RedissonScoredSortedSetRx<V> {
}); });
} }
public Flowable<V> takeLast() { public Flowable<V> takeLastElements() {
return ElementsStream.takeElements(new Callable<RFuture<V>>() { return ElementsStream.takeElements(new Callable<RFuture<V>>() {
@Override @Override
public RFuture<V> call() throws Exception { public RFuture<V> call() throws Exception {

Loading…
Cancel
Save