Class ZRandMemberCommandKt

    • Constructor Detail

    • Method Detail

      • zrandmemberCommand

         final static RedisRequest 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 RedisRequest 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.