Options
All
  • Public
  • Public/Protected
  • All
Menu

Concurrent and distributed list.

Methods that require serialization/deserialization may throw RangeError, e.g when there is no suitable serializer for a certain type.

Type parameters

  • E

Hierarchy

Index

Methods

  • add(element: E): Promise<boolean>
  • Appends the specified element to the end of the list.

    Parameters

    • element: E

      element to be added

    Returns Promise<boolean>

    true if this list has changed as a result of this operation, false otherwise.

  • addAll(elements: E[]): Promise<boolean>
  • Appends all elements in the specified array to the end of this list, keeping the order of the array.

    Parameters

    • elements: E[]

      array to be appended

    Returns Promise<boolean>

    true if this list has changed as a result of this operation, false otherwise.

  • addAllAt(index: number, elements: E[]): Promise<boolean>
  • Inserts all elements in the specified array at specified index, keeping the order of the array. Shifts the subsequent elements to the right.

    Parameters

    • index: number

      position at which the array's elements should be inserted

    • elements: E[]

      array to be inserted

    Returns Promise<boolean>

    true if this list has changed as a result of this operation, false otherwise.

  • addAt(index: number, element: E): Promise<void>
  • Inserts the specified element at the specified index. Shifts the subsequent elements to the right.

    Parameters

    • index: number

      position at which the element should be inserted

    • element: E

      element to be inserted

    Returns Promise<void>

  • addItemListener(listener: ItemListener<E>, includeValue: boolean): Promise<string>
  • Adds an item listener for this list. Listener will be invoked whenever an item is added to or removed from this list.

    Parameters

    • listener: ItemListener<E>

      object with listener functions

    • includeValue: boolean

      true if updated item should be included in the event.

    Returns Promise<string>

    registration ID of the listener.

  • clear(): Promise<void>
  • Removes all of the elements from this list.

    Returns Promise<void>

  • contains(element: E): Promise<boolean>
  • Checks if the list contains the given element.

    Parameters

    • element: E

    Returns Promise<boolean>

    true if this list contains the specified element, false otherwise.

  • containsAll(elements: E[]): Promise<boolean>
  • Checks if the list contains all of the elements of the specified array.

    Parameters

    • elements: E[]

      elements to be checked for presence in this list.

    Returns Promise<boolean>

    true if this list contains all of the elements of the specified array, false otherwise.

  • destroy(): Promise<void>
  • Destroys this object cluster-wide. Clears all resources taken for this object.

    Returns Promise<void>

  • get(index: number): Promise<E>
  • Returns the element at the specified position in this list.

    Parameters

    • index: number

      index of the element to return.

    Returns Promise<E>

  • getName(): string
  • Returns the unique name of this object.

    Returns string

  • getPartitionKey(): string
  • Returns the key of the partition that this DistributedObject is assigned to. For a partitioned data structure, the returned value will not be null, but otherwise undefined.

    Returns string

  • getServiceName(): string
  • indexOf(element: E): Promise<number>
  • Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.

    Parameters

    • element: E

      element to search for

    Returns Promise<number>

  • isEmpty(): Promise<boolean>
  • Checks if this list is empty.

    Returns Promise<boolean>

    true if this list contains no elements, false otherwise.

  • lastIndexOf(element: E): Promise<number>
  • Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.

    Parameters

    • element: E

    Returns Promise<number>

  • remove(element: E): Promise<boolean>
  • Removes the first occurrence of the specified element from this list, if it is present.

    Parameters

    • element: E

      element to be removed

    Returns Promise<boolean>

    true if this list has changed as a result of this operation, false otherwise.

  • removeAll(elements: E[]): Promise<boolean>
  • Removes from this list all of its elements that are contained in the specified array.

    Parameters

    • elements: E[]

      elements to be removed

    Returns Promise<boolean>

    true if this list has changed as a result of this operation, false otherwise.

  • removeAt(index: number): Promise<E>
  • Removes the element at the specified position in this list.

    Parameters

    • index: number

      index of the element to be removed.

    Returns Promise<E>

    the removed element.

  • removeItemListener(listenerId: string): Promise<boolean>
  • Removes an ItemListener from this list.

    Parameters

    • listenerId: string

      registration ID of the listener to be removed.

    Returns Promise<boolean>

    true if the item listener was successfully removed, false otherwise.

  • retainAll(elements: E[]): Promise<boolean>
  • Retains only the elements in this list that are contained in the specified array.

    Parameters

    • elements: E[]

      elements to retain

    Returns Promise<boolean>

    true if this list has changed as a result of this operation, false otherwise.

  • set(index: number, element: E): Promise<E>
  • Replaces the element at the specified position in this list with the specified element.

    Parameters

    • index: number

      position of the element to be replaced

    • element: E

      replacement element

    Returns Promise<E>

    previous element at the given index.

  • size(): Promise<number>
  • Returns the number of elements in this list.

    Returns Promise<number>

  • Returns a view of this list that contains elements between index numbers from start (inclusive) to end (exclusive)

    Parameters

    • start: number

      start of the view

    • end: number

      end of the view

    Returns Promise<ReadOnlyLazyList<E>>

    a view of the list

  • toArray(): Promise<E[]>
  • Returns an array that contains all elements of this list in proper sequence (from first to last element).

    Returns Promise<E[]>

Generated using TypeDoc