Class ReactiveSetCommandsImpl<K,V>

All Implemented Interfaces:
ReactiveRedisCommands, ReactiveSetCommands<K,V>

public class ReactiveSetCommandsImpl<K,V> extends AbstractSetCommands<K,V> implements ReactiveSetCommands<K,V>
  • Constructor Details

  • Method Details

    • getDataSource

      public ReactiveRedisDataSource getDataSource()
      Specified by:
      getDataSource in interface ReactiveRedisCommands
      Returns:
      the data source.
    • sadd

      public io.smallrye.mutiny.Uni<Integer> sadd(K key, V... members)
      Description copied from interface: ReactiveSetCommands
      Execute the command SADD. Summary: Add one or more members to a set Group: set Requires Redis 1.0.0
      Specified by:
      sadd in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      members - the values
      Returns:
      the number of elements that were added to the set, not including all the elements already present in the set.
    • scard

      public io.smallrye.mutiny.Uni<Long> scard(K key)
      Description copied from interface: ReactiveSetCommands
      Execute the command SCARD. Summary: Get the number of members in a set Group: set Requires Redis 1.0.0
      Specified by:
      scard in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the cardinality (number of elements) of the set, or 0 key does not exist.
    • sdiff

      public io.smallrye.mutiny.Uni<Set<V>> sdiff(K... keys)
      Description copied from interface: ReactiveSetCommands
      Execute the command SDIFF. Summary: Subtract multiple sets Group: set Requires Redis 1.0.0
      Specified by:
      sdiff in interface ReactiveSetCommands<K,V>
      Parameters:
      keys - the keys
      Returns:
      list with members of the resulting set.
    • sdiffstore

      public io.smallrye.mutiny.Uni<Long> sdiffstore(K destination, K... keys)
      Description copied from interface: ReactiveSetCommands
      Execute the command SDIFFSTORE. Summary: Subtract multiple sets and store the resulting set in a key Group: set Requires Redis 1.0.0
      Specified by:
      sdiffstore in interface ReactiveSetCommands<K,V>
      Parameters:
      destination - the key
      keys - the keys
      Returns:
      the number of elements in the resulting set.
    • sinter

      public io.smallrye.mutiny.Uni<Set<V>> sinter(K... keys)
      Description copied from interface: ReactiveSetCommands
      Execute the command SINTER. Summary: Intersect multiple sets Group: set Requires Redis 1.0.0
      Specified by:
      sinter in interface ReactiveSetCommands<K,V>
      Parameters:
      keys - the keys
      Returns:
      list with members of the resulting set.
    • sintercard

      public io.smallrye.mutiny.Uni<Long> sintercard(K... keys)
      Description copied from interface: ReactiveSetCommands
      Execute the command SINTERCARD. Summary: Intersect multiple sets and return the cardinality of the result Group: set Requires Redis 7.0.0
      Specified by:
      sintercard in interface ReactiveSetCommands<K,V>
      Parameters:
      keys - the keys
      Returns:
      the number of elements in the resulting intersection.
    • sintercard

      public io.smallrye.mutiny.Uni<Long> sintercard(int limit, K... keys)
      Description copied from interface: ReactiveSetCommands
      Execute the command SINTERCARD. Summary: Intersect multiple sets and return the cardinality of the result Group: set Requires Redis 7.0.0
      Specified by:
      sintercard in interface ReactiveSetCommands<K,V>
      Parameters:
      limit - When provided with the optional LIMIT argument (which defaults to 0 and means unlimited), if the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality.
      keys - the keys
      Returns:
      the number of elements in the resulting intersection.
    • sinterstore

      public io.smallrye.mutiny.Uni<Long> sinterstore(K destination, K... keys)
      Description copied from interface: ReactiveSetCommands
      Execute the command SINTERSTORE. Summary: Intersect multiple sets and store the resulting set in a key Group: set Requires Redis 1.0.0
      Specified by:
      sinterstore in interface ReactiveSetCommands<K,V>
      Parameters:
      destination - the key
      keys - the keys
      Returns:
      the number of elements in the resulting set.
    • sismember

      public io.smallrye.mutiny.Uni<Boolean> sismember(K key, V member)
      Description copied from interface: ReactiveSetCommands
      Execute the command SISMEMBER. Summary: Determine if a given value is a member of a set Group: set Requires Redis 1.0.0
      Specified by:
      sismember in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      member - the member to check
      Returns:
      true the element is a member of the set. false the element is not a member of the set, or if key does not exist.
    • smembers

      public io.smallrye.mutiny.Uni<Set<V>> smembers(K key)
      Description copied from interface: ReactiveSetCommands
      Execute the command SMEMBERS. Summary: Get all the members in a set Group: set Requires Redis 1.0.0
      Specified by:
      smembers in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      Returns:
      all elements of the set.
    • smismember

      public io.smallrye.mutiny.Uni<List<Boolean>> smismember(K key, V... members)
      Description copied from interface: ReactiveSetCommands
      Execute the command SMISMEMBER. Summary: Returns the membership associated with the given elements for a set Group: set Requires Redis 6.2.0
      Specified by:
      smismember in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      members - the members to check
      Returns:
      list representing the membership of the given elements, in the same order as they are requested.
    • smove

      public io.smallrye.mutiny.Uni<Boolean> smove(K source, K destination, V member)
      Description copied from interface: ReactiveSetCommands
      Execute the command SMOVE. Summary: Move a member from one set to another Group: set Requires Redis 1.0.0
      Specified by:
      smove in interface ReactiveSetCommands<K,V>
      Parameters:
      source - the key
      destination - the key
      member - the member to move
      Returns:
      true the element is moved. false the element is not a member of source and no operation was performed.
    • spop

      public io.smallrye.mutiny.Uni<V> spop(K key)
      Description copied from interface: ReactiveSetCommands
      Execute the command SPOP. Summary: Remove and return one or multiple random members from a set Group: set Requires Redis 1.0.0
      Specified by:
      spop in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the removed member, or null when key does not exist.
    • spop

      public io.smallrye.mutiny.Uni<Set<V>> spop(K key, int count)
      Description copied from interface: ReactiveSetCommands
      Execute the command SPOP. Summary: Remove and return one or multiple random members from a set Group: set Requires Redis 1.0.0
      Specified by:
      spop in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the removed members, or an empty array when key does not exist.
    • srandmember

      public io.smallrye.mutiny.Uni<V> srandmember(K key)
      Description copied from interface: ReactiveSetCommands
      Execute the command SRANDMEMBER. Summary: Get one or multiple random members from a set Group: set Requires Redis 1.0.0
      Specified by:
      srandmember in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the randomly selected element, or null when key does not exist.
    • srandmember

      public io.smallrye.mutiny.Uni<List<V>> srandmember(K key, int count)
      Description copied from interface: ReactiveSetCommands
      Execute the command SRANDMEMBER. Summary: Get one or multiple random members from a set Group: set Requires Redis 1.0.0
      Specified by:
      srandmember in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      count - the number of elements to pick
      Returns:
      an array of elements, or an empty array when key does not exist.
    • srem

      public io.smallrye.mutiny.Uni<Integer> srem(K key, V... members)
      Description copied from interface: ReactiveSetCommands
      Execute the command SREM. Summary: Remove one or more members from a set Group: set Requires Redis 1.0.0
      Specified by:
      srem in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the number of members that were removed from the set, not including non-existing members.
    • sunion

      public io.smallrye.mutiny.Uni<Set<V>> sunion(K... keys)
      Description copied from interface: ReactiveSetCommands
      Execute the command SUNION. Summary: Add multiple sets Group: set Requires Redis 1.0.0
      Specified by:
      sunion in interface ReactiveSetCommands<K,V>
      Parameters:
      keys - the keys
      Returns:
      list with members of the resulting set.
    • sunionstore

      public io.smallrye.mutiny.Uni<Long> sunionstore(K destination, K... keys)
      Description copied from interface: ReactiveSetCommands
      Execute the command SUNIONSTORE. Summary: Add multiple sets and store the resulting set in a key Group: set Requires Redis 1.0.0
      Specified by:
      sunionstore in interface ReactiveSetCommands<K,V>
      Parameters:
      destination - the destination key
      keys - the keys
      Returns:
      the number of elements in the resulting set.
    • sscan

      public ReactiveSScanCursor<V> sscan(K key)
      Description copied from interface: ReactiveSetCommands
      Execute the command SSCAN. Summary: Incrementally iterate Set elements Group: set Requires Redis 2.8.0
      Specified by:
      sscan in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the cursor
    • sscan

      public ReactiveSScanCursor<V> sscan(K key, ScanArgs scanArgs)
      Description copied from interface: ReactiveSetCommands
      Execute the command SSCAN. Summary: Incrementally iterate Set elements Group: set Requires Redis 2.8.0
      Specified by:
      sscan in interface ReactiveSetCommands<K,V>
      Parameters:
      key - the key
      scanArgs - the extra parameters
      Returns:
      the cursor