Class ZRandMemberCommandKt
-
- All Implemented Interfaces:
public final class ZRandMemberCommandKt
-
-
Method Summary
Modifier and Type Method Description final static ValkeyRequestzrandmemberCommand(String key, Long count, ElementSink<StreamWithLength> sink)final static ValkeyRequestzrandmemberWithScoresCommand(String key, Long count, ScoredElementSink<StreamWithLength> sink)-
-
Method Detail
-
zrandmemberCommand
final static ValkeyRequest zrandmemberCommand(String key, Long count, ElementSink<StreamWithLength> sink)
- Parameters:
count-optional, the number of members to return. A positive count returns distinct members, a negative count may return the same member multiple times. If not set, at most one member is returned
sink-called once per returned random member (none if the key does not exist). The stream is read directly from the connection and is only valid until the callback returns, unread parts are skipped.
-
zrandmemberWithScoresCommand
final static ValkeyRequest zrandmemberWithScoresCommand(String key, Long count, ScoredElementSink<StreamWithLength> sink)
- Parameters:
count-the number of members to return. A positive count returns distinct members, a negative count may return the same member multiple times
sink-called once per returned random member (none if the key does not exist). The stream is read directly from the connection and is only valid until the callback returns, unread parts are skipped.
-
-
-
-