Interface SetBinaryCommands

All Known Subinterfaces:
JedisBinaryCommands
All Known Implementing Classes:
Jedis, JedisCluster, JedisPooled, JedisSentineled, JedisSharding, UnifiedJedis

public interface SetBinaryCommands
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    sadd(byte[] key, byte[]... members)
     
    long
    scard(byte[] key)
     
    Set<byte[]>
    sdiff(byte[]... keys)
     
    long
    sdiffstore(byte[] dstkey, byte[]... keys)
     
    Set<byte[]>
    sinter(byte[]... keys)
     
    long
    sintercard(byte[]... keys)
    This command works exactly like SINTER but instead of returning the result set, it returns just the cardinality of the result.
    long
    sintercard(int limit, byte[]... keys)
    This command works exactly like SINTER but instead of returning the result set, it returns just the cardinality of the result.
    long
    sinterstore(byte[] dstkey, byte[]... keys)
     
    boolean
    sismember(byte[] key, byte[] member)
     
    Set<byte[]>
    smembers(byte[] key)
     
    smismember(byte[] key, byte[]... members)
     
    long
    smove(byte[] srckey, byte[] dstkey, byte[] member)
     
    byte[]
    spop(byte[] key)
     
    Set<byte[]>
    spop(byte[] key, long count)
     
    byte[]
    srandmember(byte[] key)
     
    List<byte[]>
    srandmember(byte[] key, int count)
     
    long
    srem(byte[] key, byte[]... members)
     
    default ScanResult<byte[]>
    sscan(byte[] key, byte[] cursor)
     
    ScanResult<byte[]>
    sscan(byte[] key, byte[] cursor, ScanParams params)
     
    Set<byte[]>
    sunion(byte[]... keys)
     
    long
    sunionstore(byte[] dstkey, byte[]... keys)
     
  • Method Details

    • sadd

      long sadd(byte[] key, byte[]... members)
    • smembers

      Set<byte[]> smembers(byte[] key)
    • srem

      long srem(byte[] key, byte[]... members)
    • spop

      byte[] spop(byte[] key)
    • spop

      Set<byte[]> spop(byte[] key, long count)
    • scard

      long scard(byte[] key)
    • sismember

      boolean sismember(byte[] key, byte[] member)
    • smismember

      List<Boolean> smismember(byte[] key, byte[]... members)
    • srandmember

      byte[] srandmember(byte[] key)
    • srandmember

      List<byte[]> srandmember(byte[] key, int count)
    • sscan

      default ScanResult<byte[]> sscan(byte[] key, byte[] cursor)
    • sscan

      ScanResult<byte[]> sscan(byte[] key, byte[] cursor, ScanParams params)
    • sdiff

      Set<byte[]> sdiff(byte[]... keys)
    • sdiffstore

      long sdiffstore(byte[] dstkey, byte[]... keys)
    • sinter

      Set<byte[]> sinter(byte[]... keys)
    • sinterstore

      long sinterstore(byte[] dstkey, byte[]... keys)
    • sintercard

      long sintercard(byte[]... keys)
      This command works exactly like SINTER but instead of returning the result set, it returns just the cardinality of the result. LIMIT defaults to 0 and means unlimited

      Time complexity O(N*M) worst case where N is the cardinality of the smallest

      Parameters:
      keys -
      Returns:
      The cardinality of the set which would result from the intersection of all the given sets
    • sintercard

      long sintercard(int limit, byte[]... keys)
      This command works exactly like SINTER but instead of returning the result set, it returns just the cardinality of the result.

      Time complexity O(N*M) worst case where N is the cardinality of the smallest

      Parameters:
      limit - If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality.
      keys -
      Returns:
      The cardinality of the set which would result from the intersection of all the given sets
    • sunion

      Set<byte[]> sunion(byte[]... keys)
    • sunionstore

      long sunionstore(byte[] dstkey, byte[]... keys)
    • smove

      long smove(byte[] srckey, byte[] dstkey, byte[] member)