Interface RedisListReactiveCommands<K,​V>

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      Mono<V> blmove​(K source, K destination, LMoveArgs args, double timeout)
      Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.
      Mono<V> blmove​(K source, K destination, LMoveArgs args, long timeout)
      Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.
      Mono<KeyValue<K,​List<V>>> blmpop​(double timeout, LMPopArgs args, K... keys)
      Remove and get the first/last elements in a list, or block until one is available.
      Mono<KeyValue<K,​List<V>>> blmpop​(long timeout, LMPopArgs args, K... keys)
      Remove and get the first/last elements in a list, or block until one is available.
      Mono<KeyValue<K,​V>> blpop​(double timeout, K... keys)
      Remove and get the first element in a list, or block until one is available.
      Mono<KeyValue<K,​V>> blpop​(long timeout, K... keys)
      Remove and get the first element in a list, or block until one is available.
      Mono<KeyValue<K,​V>> brpop​(double timeout, K... keys)
      Remove and get the last element in a list, or block until one is available.
      Mono<KeyValue<K,​V>> brpop​(long timeout, K... keys)
      Remove and get the last element in a list, or block until one is available.
      Mono<V> brpoplpush​(double timeout, K source, K destination)
      Pop a value from a list, push it to another list and return it; or block until one is available.
      Mono<V> brpoplpush​(long timeout, K source, K destination)
      Pop a value from a list, push it to another list and return it; or block until one is available.
      Mono<V> lindex​(K key, long index)
      Get an element from a list by its index.
      Mono<Long> linsert​(K key, boolean before, V pivot, V value)
      Insert an element before or after another element in a list.
      Mono<Long> llen​(K key)
      Get the length of a list.
      Mono<V> lmove​(K source, K destination, LMoveArgs args)
      Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.
      Mono<KeyValue<K,​List<V>>> lmpop​(LMPopArgs args, K... keys)
      Remove and get the first/last elements in a list.
      Mono<V> lpop​(K key)
      Remove and get the first element in a list.
      Flux<V> lpop​(K key, long count)
      Remove and get the first count elements in a list.
      Mono<Long> lpos​(K key, V value)
      Return the index of matching elements inside a Redis list.
      Flux<Long> lpos​(K key, V value, int count)
      Return the index of matching elements inside a Redis list using the COUNT option.
      Flux<Long> lpos​(K key, V value, int count, LPosArgs args)
      Return the index of matching elements inside a Redis list using the COUNT option.
      Mono<Long> lpos​(K key, V value, LPosArgs args)
      Return the index of matching elements inside a Redis list.
      Mono<Long> lpush​(K key, V... values)
      Prepend one or multiple values to a list.
      Mono<Long> lpushx​(K key, V... values)
      Prepend values to a list, only if the list exists.
      Mono<Long> lrange​(ValueStreamingChannel<V> channel, K key, long start, long stop)
      Deprecated.
      since 6.0 in favor of consuming large results through the Publisher returned by lrange(K, long, long).
      Flux<V> lrange​(K key, long start, long stop)
      Get a range of elements from a list.
      Mono<Long> lrem​(K key, long count, V value)
      Remove elements from a list.
      Mono<String> lset​(K key, long index, V value)
      Set the value of an element in a list by its index.
      Mono<String> ltrim​(K key, long start, long stop)
      Trim a list to the specified range.
      Mono<V> rpop​(K key)
      Remove and get the last element in a list.
      Flux<V> rpop​(K key, long count)
      Remove and get the last count elements in a list.
      Mono<V> rpoplpush​(K source, K destination)
      Remove the last element in a list, append it to another list and return it.
      Mono<Long> rpush​(K key, V... values)
      Append one or multiple values to a list.
      Mono<Long> rpushx​(K key, V... values)
      Append values to a list, only if the list exists.
    • Method Detail

      • blmove

        Mono<V> blmove​(K source,
                       K destination,
                       LMoveArgs args,
                       long timeout)
        Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination. When source is empty, Redis will block the connection until another client pushes to it or until timeout is reached.
        Parameters:
        source - the source key.
        destination - the destination type: key.
        args - command arguments to configure source and destination directions.
        timeout - the timeout in seconds.
        Returns:
        V bulk-string-reply the element being popped and pushed.
        Since:
        6.1
      • blmove

        Mono<V> blmove​(K source,
                       K destination,
                       LMoveArgs args,
                       double timeout)
        Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination. When source is empty, Redis will block the connection until another client pushes to it or until timeout is reached.
        Parameters:
        source - the source key.
        destination - the destination type: key.
        args - command arguments to configure source and destination directions.
        timeout - the timeout in seconds.
        Returns:
        V bulk-string-reply the element being popped and pushed.
        Since:
        6.1.3
      • blmpop

        Mono<KeyValue<K,​List<V>>> blmpop​(long timeout,
                                               LMPopArgs args,
                                               K... keys)
        Remove and get the first/last elements in a list, or block until one is available.
        Parameters:
        timeout - the timeout in seconds.
        args - the additional command arguments.
        keys - the keys.
        Returns:
        KeyValue<K,V> array-reply specifically. null when key does not exist or the timeout was exceeded.
        Since:
        6.2
      • blmpop

        Mono<KeyValue<K,​List<V>>> blmpop​(double timeout,
                                               LMPopArgs args,
                                               K... keys)
        Remove and get the first/last elements in a list, or block until one is available.
        Parameters:
        timeout - the timeout in seconds.
        args - the additional command arguments.
        keys - the keys.
        Returns:
        KeyValue<K,V> array-reply specifically. null when key does not exist or the timeout was exceeded.
        Since:
        6.2
      • blpop

        Mono<KeyValue<K,​V>> blpop​(long timeout,
                                        K... keys)
        Remove and get the first element in a list, or block until one is available.
        Parameters:
        timeout - the timeout in seconds.
        keys - the keys.
        Returns:
        KeyValue<K,V> array-reply specifically: A null multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
      • blpop

        Mono<KeyValue<K,​V>> blpop​(double timeout,
                                        K... keys)
        Remove and get the first element in a list, or block until one is available.
        Parameters:
        timeout - the timeout in seconds.
        keys - the keys.
        Returns:
        KeyValue<K,V> array-reply specifically: A null multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
        Since:
        6.1.3
      • brpop

        Mono<KeyValue<K,​V>> brpop​(long timeout,
                                        K... keys)
        Remove and get the last element in a list, or block until one is available.
        Parameters:
        timeout - the timeout in seconds.
        keys - the keys.
        Returns:
        KeyValue<K,V> array-reply specifically: A null multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
      • brpop

        Mono<KeyValue<K,​V>> brpop​(double timeout,
                                        K... keys)
        Remove and get the last element in a list, or block until one is available.
        Parameters:
        timeout - the timeout in seconds.
        keys - the keys.
        Returns:
        KeyValue<K,V> array-reply specifically: A null multi-bulk when no element could be popped and the timeout expired. A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
        Since:
        6.1.3
      • brpoplpush

        Mono<V> brpoplpush​(long timeout,
                           K source,
                           K destination)
        Pop a value from a list, push it to another list and return it; or block until one is available.
        Parameters:
        timeout - the timeout in seconds.
        source - the source key.
        destination - the destination type: key.
        Returns:
        V bulk-string-reply the element being popped from source and pushed to destination. If timeout is reached, a.
      • brpoplpush

        Mono<V> brpoplpush​(double timeout,
                           K source,
                           K destination)
        Pop a value from a list, push it to another list and return it; or block until one is available.
        Parameters:
        timeout - the timeout in seconds.
        source - the source key.
        destination - the destination type: key.
        Returns:
        V bulk-string-reply the element being popped from source and pushed to destination. If timeout is reached, a.
        Since:
        6.1.3
      • lindex

        Mono<V> lindex​(K key,
                       long index)
        Get an element from a list by its index.
        Parameters:
        key - the key.
        index - the index type: long.
        Returns:
        V bulk-string-reply the requested element, or null when index is out of range.
      • linsert

        Mono<Long> linsert​(K key,
                           boolean before,
                           V pivot,
                           V value)
        Insert an element before or after another element in a list.
        Parameters:
        key - the key.
        before - the before.
        pivot - the pivot.
        value - the value.
        Returns:
        Long integer-reply the length of the list after the insert operation, or -1 when the value pivot was not found.
      • llen

        Mono<Long> llen​(K key)
        Get the length of a list.
        Parameters:
        key - the key.
        Returns:
        Long integer-reply the length of the list at key.
      • lmove

        Mono<V> lmove​(K source,
                      K destination,
                      LMoveArgs args)
        Atomically returns and removes the first/last element (head/tail depending on the where from argument) of the list stored at source, and pushes the element at the first/last element (head/tail depending on the whereto argument) of the list stored at destination.
        Parameters:
        source - the source key.
        destination - the destination type: key.
        args - command arguments to configure source and destination directions.
        Returns:
        V bulk-string-reply the element being popped and pushed.
        Since:
        6.1
      • lmpop

        Mono<KeyValue<K,​List<V>>> lmpop​(LMPopArgs args,
                                              K... keys)
        Remove and get the first/last elements in a list.
        Parameters:
        args - the additional command arguments.
        keys - the keys.
        Returns:
        KeyValue<K,V> array-reply specifically. null when key does not exist.
        Since:
        6.2
      • lpop

        Mono<V> lpop​(K key)
        Remove and get the first element in a list.
        Parameters:
        key - the key.
        Returns:
        V bulk-string-reply the value of the first element, or null when key does not exist.
      • lpop

        Flux<V> lpop​(K key,
                     long count)
        Remove and get the first count elements in a list.
        Parameters:
        key - the key.
        count - the number of elements to return.
        Returns:
        Since:
        6.1
      • lpos

        Mono<Long> lpos​(K key,
                        V value)
        Return the index of matching elements inside a Redis list. By default, when no options are given, it will scan the list from head to tail, looking for the first match of "element". If the element is found, its index (the zero-based position in the list) is returned. Otherwise, if no match is found, null is returned. The returned elements indexes are always referring to what lindex(java.lang.Object, long) would return. So first element from head is 0, and so forth.
        Parameters:
        key - the key.
        value - the element to search for.
        Returns:
        V integer-reply representing the matching element, or null if there is no match.
        Since:
        5.3.2
      • lpos

        Mono<Long> lpos​(K key,
                        V value,
                        LPosArgs args)
        Return the index of matching elements inside a Redis list. By default, when no options are given, it will scan the list from head to tail, looking for the first match of "element". If the element is found, its index (the zero-based position in the list) is returned. Otherwise, if no match is found, null is returned. The returned elements indexes are always referring to what lindex(java.lang.Object, long) would return. So first element from head is 0, and so forth.
        Parameters:
        key - the key.
        value - the element to search for.
        args - command arguments to configureFIRST and MAXLEN options.
        Returns:
        V integer-reply representing the matching element, or null if there is no match.
        Since:
        5.3.2
      • lpos

        Flux<Long> lpos​(K key,
                        V value,
                        int count)
        Return the index of matching elements inside a Redis list using the COUNT option. By default, when no options are given, it will scan the list from head to tail, looking for the first match of "element". The returned elements indexes are always referring to what lindex(java.lang.Object, long) would return. So first element from head is 0, and so forth.
        Parameters:
        key - the key.
        value - the element to search for.
        count - limit the number of matches.
        Returns:
        V integer-reply representing the matching elements, or empty if there is no match.
        Since:
        5.3.2
      • lpos

        Flux<Long> lpos​(K key,
                        V value,
                        int count,
                        LPosArgs args)
        Return the index of matching elements inside a Redis list using the COUNT option. By default, when no options are given, it will scan the list from head to tail, looking for the first match of "element". The returned elements indexes are always referring to what lindex(java.lang.Object, long) would return. So first element from head is 0, and so forth.
        Parameters:
        key - the key.
        value - the element to search for.
        count - limit the number of matches.
        args - command arguments to configureFIRST and MAXLEN options.
        Returns:
        V integer-reply representing the matching elements, or empty if there is no match.
        Since:
        5.3.2
      • lpush

        Mono<Long> lpush​(K key,
                         V... values)
        Prepend one or multiple values to a list.
        Parameters:
        key - the key.
        values - the value.
        Returns:
        Long integer-reply the length of the list after the push operations.
      • lpushx

        Mono<Long> lpushx​(K key,
                          V... values)
        Prepend values to a list, only if the list exists.
        Parameters:
        key - the key.
        values - the values.
        Returns:
        Long integer-reply the length of the list after the push operation.
      • lrange

        Flux<V> lrange​(K key,
                       long start,
                       long stop)
        Get a range of elements from a list.
        Parameters:
        key - the key.
        start - the start type: long.
        stop - the stop type: long.
        Returns:
        V array-reply list of elements in the specified range.
      • lrange

        @Deprecated
        Mono<Long> lrange​(ValueStreamingChannel<V> channel,
                          K key,
                          long start,
                          long stop)
        Deprecated.
        since 6.0 in favor of consuming large results through the Publisher returned by lrange(K, long, long).
        Get a range of elements from a list.
        Parameters:
        channel - the channel.
        key - the key.
        start - the start type: long.
        stop - the stop type: long.
        Returns:
        Long count of elements in the specified range.
      • lrem

        Mono<Long> lrem​(K key,
                        long count,
                        V value)
        Remove elements from a list.
        Parameters:
        key - the key.
        count - the count type: long.
        value - the value.
        Returns:
        Long integer-reply the number of removed elements.
      • lset

        Mono<String> lset​(K key,
                          long index,
                          V value)
        Set the value of an element in a list by its index.
        Parameters:
        key - the key.
        index - the index type: long.
        value - the value.
        Returns:
        String simple-string-reply.
      • ltrim

        Mono<String> ltrim​(K key,
                           long start,
                           long stop)
        Trim a list to the specified range.
        Parameters:
        key - the key.
        start - the start type: long.
        stop - the stop type: long.
        Returns:
        String simple-string-reply.
      • rpop

        Mono<V> rpop​(K key)
        Remove and get the last element in a list.
        Parameters:
        key - the key.
        Returns:
        V bulk-string-reply the value of the last element, or null when key does not exist.
      • rpop

        Flux<V> rpop​(K key,
                     long count)
        Remove and get the last count elements in a list.
        Parameters:
        key - the key.
        count - the number of elements to return.
        Returns:
        V array-reply list of the last count elements, or null when key does not exist.
        Since:
        6.1
      • rpoplpush

        Mono<V> rpoplpush​(K source,
                          K destination)
        Remove the last element in a list, append it to another list and return it.
        Parameters:
        source - the source key.
        destination - the destination type: key.
        Returns:
        V bulk-string-reply the element being popped and pushed.
      • rpush

        Mono<Long> rpush​(K key,
                         V... values)
        Append one or multiple values to a list.
        Parameters:
        key - the key.
        values - the value.
        Returns:
        Long integer-reply the length of the list after the push operation.
      • rpushx

        Mono<Long> rpushx​(K key,
                          V... values)
        Append values to a list, only if the list exists.
        Parameters:
        key - the key.
        values - the values.
        Returns:
        Long integer-reply the length of the list after the push operation.