Interface RDequeReactive<V>

    • Method Detail

      • addFirstIfExists

        reactor.core.publisher.Mono<> addFirstIfExists​(V... elements)
        Adds element at the head of existing deque.
        Parameters:
        elements - - elements to add
        Returns:
        length of the list
      • addLastIfExists

        reactor.core.publisher.Mono<> addLastIfExists​(V... elements)
        Adds element at the tail of existing deque.
        Parameters:
        elements - - elements to add
        Returns:
        length of the list
      • descendingIterator

        reactor.core.publisher.Flux<V> descendingIterator()
      • removeLastOccurrence

        reactor.core.publisher.Mono<> removeLastOccurrence​( o)
        Removes last occurrence of element o
        Parameters:
        o - - element
        Returns:
        true if object has been removed otherwise false
      • removeLast

        reactor.core.publisher.Mono<V> removeLast()
        Retrieves and removes the last element of deque. Returns null if there are no elements in deque.
        Returns:
        element
      • removeFirst

        reactor.core.publisher.Mono<V> removeFirst()
        Retrieves and removes the first element of deque. Returns null if there are no elements in deque.
        Returns:
        element
      • removeFirstOccurrence

        reactor.core.publisher.Mono<> removeFirstOccurrence​( o)
        Removes first occurrence of element o
        Parameters:
        o - - element to remove
        Returns:
        true if object has been removed otherwise false
      • push

        reactor.core.publisher.Mono<> push​(V e)
        Adds element at the head of this deque.
        Parameters:
        e - - element to add
        Returns:
        void
      • pop

        reactor.core.publisher.Mono<V> pop()
        Retrieves and removes element at the head of this deque. Returns null if there are no elements in deque.
        Returns:
        element
      • pollLast

        reactor.core.publisher.Mono<V> pollLast()
        Retrieves and removes element at the tail of this deque. Returns null if there are no elements in deque.
        Returns:
        element
      • pollFirst

        reactor.core.publisher.Mono<V> pollFirst()
        Retrieves and removes element at the head of this deque. Returns null if there are no elements in deque.
        Returns:
        element
      • pollLast

        reactor.core.publisher.Flux<V> pollLast​(int limit)
        Retrieves and removes the tail elements of this queue. Elements amount limited by limit param.
        Returns:
        list of tail elements
      • pollFirst

        reactor.core.publisher.Flux<V> pollFirst​(int limit)
        Retrieves and removes the head elements of this queue. Elements amount limited by limit param.
        Returns:
        list of head elements
      • peekLast

        reactor.core.publisher.Mono<V> peekLast()
        Returns element at the tail of this deque or null if there are no elements in deque.
        Returns:
        element
      • peekFirst

        reactor.core.publisher.Mono<V> peekFirst()
        Returns element at the head of this deque or null if there are no elements in deque.
        Returns:
        element
      • offerLast

        reactor.core.publisher.Mono<> offerLast​(V e)
        Adds element at the tail of this deque.
        Parameters:
        e - - element to add
        Returns:
        true if element was added to this deque otherwise false
      • getLast

        reactor.core.publisher.Mono<V> getLast()
        Returns element at the tail of this deque or null if there are no elements in deque.
        Returns:
        element
      • addLast

        reactor.core.publisher.Mono<> addLast​(V e)
        Adds element at the tail of this deque.
        Parameters:
        e - - element to add
        Returns:
        void
      • addFirst

        reactor.core.publisher.Mono<> addFirst​(V e)
        Adds element at the head of this deque.
        Parameters:
        e - - element to add
        Returns:
        void
      • offerFirst

        reactor.core.publisher.Mono<> offerFirst​(V e)
        Adds element at the head of this deque.
        Parameters:
        e - - element to add
        Returns:
        true if element was added to this deque otherwise false
      • move

        reactor.core.publisher.Mono<V> move​(DequeMoveArgs args)
        Move element from this deque to the given destination deque. Returns moved element.

        Usage examples:

         V element = deque.move(DequeMoveArgs.pollLast()
                                         .addFirstTo("deque2"));
         
         V elements = deque.move(DequeMoveArgs.pollFirst()
                                         .addLastTo("deque2"));
         

        Requires Redis 6.2.0 and higher.

        Parameters:
        args - - arguments object
        Returns:
        moved element