Interface RListAsync<V>

Type Parameters:
V - the type of elements held in this collection
All Superinterfaces:
RandomAccess, RCollectionAsync<V>, RExpirableAsync, RObjectAsync, RSortableAsync<List<V>>
All Known Subinterfaces:
RList<V>
All Known Implementing Classes:
RedissonBlockingDeque, RedissonBlockingQueue, RedissonBoundedBlockingQueue, RedissonDeque, RedissonList, RedissonListMultimapValues, RedissonPriorityBlockingDeque, RedissonPriorityBlockingQueue, RedissonPriorityDeque, RedissonPriorityQueue, RedissonQueue, RedissonRingBuffer, RedissonSubList

public interface RListAsync<V> extends RCollectionAsync<V>, RSortableAsync<List<V>>, RandomAccess
Async list functions
Author:
Nikita Koksharov
  • Method Details

    • getAsync

      RFuture<List<V>> getAsync(int... indexes)
      Loads elements by specified indexes
      Parameters:
      indexes - of elements
      Returns:
      elements
    • addAfterAsync

      RFuture<Integer> addAfterAsync(V elementToFind, V element)
      Inserts element after elementToFind
      Parameters:
      elementToFind - - object to find
      element - - object to add
      Returns:
      new list size
    • addBeforeAsync

      RFuture<Integer> addBeforeAsync(V elementToFind, V element)
      Inserts element before elementToFind
      Parameters:
      elementToFind - - object to find
      element - - object to add
      Returns:
      new list size
    • addAsync

      RFuture<Boolean> addAsync(int index, V element)
      Inserts element at index. Subsequent elements are shifted.
      Parameters:
      index - - index number
      element - - element to insert
      Returns:
      true if list was changed
    • addAllAsync

      RFuture<Boolean> addAllAsync(int index, Collection<? extends V> elements)
      Inserts elements at index. Subsequent elements are shifted.
      Parameters:
      index - - index number
      elements - - elements to insert
      Returns:
      true if list changed or false if element isn't found
    • lastIndexOfAsync

      RFuture<Integer> lastIndexOfAsync(Object element)
      Returns last index of element or -1 if element isn't found
      Parameters:
      element - to find
      Returns:
      index of -1 if element isn't found
    • indexOfAsync

      RFuture<Integer> indexOfAsync(Object element)
      Returns last index of element or -1 if element isn't found
      Parameters:
      element - to find
      Returns:
      index of -1 if element isn't found
    • fastSetAsync

      RFuture<Void> fastSetAsync(int index, V element)
      Set element at index. Works faster than setAsync(int, Object) but doesn't return previous element.
      Parameters:
      index - - index of object
      element - - object
      Returns:
      void
    • setAsync

      RFuture<V> setAsync(int index, V element)
      Set element at index and returns previous element.
      Parameters:
      index - - index of object
      element - - object
      Returns:
      previous element or null if element wasn't set.
    • getAsync

      RFuture<V> getAsync(int index)
      Get element at index
      Parameters:
      index - - index of object
      Returns:
      element
    • readAllAsync

      RFuture<List<V>> readAllAsync()
      Read all elements at once
      Returns:
      list of values
    • trimAsync

      RFuture<Void> trimAsync(int fromIndex, int toIndex)
      Trim list and remains elements only in specified range fromIndex, inclusive, and toIndex, inclusive.
      Parameters:
      fromIndex - - from index
      toIndex - - to index
      Returns:
      void
    • fastRemoveAsync

      RFuture<Void> fastRemoveAsync(int index)
      Removes element at index. Works faster than removeAsync(Object, int) but doesn't return element.
      Parameters:
      index - - index of object
      Returns:
      void
    • removeAsync

      RFuture<V> removeAsync(int index)
      Removes element at index.
      Parameters:
      index - - index of object
      Returns:
      element or null if element wasn't set.
    • removeAsync

      RFuture<Boolean> removeAsync(Object element, int count)
      Removes up to count occurrences of element
      Parameters:
      element - - element to find
      count - - amount occurrences
      Returns:
      true if at least one element removed; or false if element isn't found
    • rangeAsync

      RFuture<List<V>> rangeAsync(int toIndex)
      Returns range of values from 0 index to toIndex. Indexes are zero based. -1 means the last element, -2 means penultimate and so on.
      Parameters:
      toIndex - - end index
      Returns:
      elements
    • rangeAsync

      RFuture<List<V>> rangeAsync(int fromIndex, int toIndex)
      Returns range of values from fromIndex to toIndex index including. Indexes are zero based. -1 means the last element, -2 means penultimate and so on.
      Parameters:
      fromIndex - - start index
      toIndex - - end index
      Returns:
      elements
    • addListenerAsync

      RFuture<Integer> addListenerAsync(ObjectListener listener)
      Adds object event listener
      Specified by:
      addListenerAsync in interface RObjectAsync
      Parameters:
      listener - - object event listener
      Returns:
      listener id
      See Also: