Class ZMPopCommandKt
-
- All Implemented Interfaces:
public final class ZMPopCommandKt
-
-
Method Summary
Modifier and Type Method Description final static RedisRequestzmpopCommand(Collection<String> keys, ZMPopSide side, Long count, Function1<String, Unit> onKey, ScoredElementSink<StreamWithLength> sink)Pops members from the first non-empty sorted set of keys. -
-
Method Detail
-
zmpopCommand
final static RedisRequest zmpopCommand(Collection<String> keys, ZMPopSide side, Long count, Function1<String, Unit> onKey, ScoredElementSink<StreamWithLength> sink)
Pops members from the first non-empty sorted set of keys.
- Parameters:
count-optional, the maximum number of members to pop (defaults to 1)
onKey-called with the name of the sorted set popped from, before any member is passed to the sink. Not called if all sorted sets were empty.
sink-called once per popped member, then ScoredElementSink.onComplete is called once (also when nothing was popped). The stream is read directly from the connection and is only valid until the callback returns, unread parts are skipped.
-
-
-
-