Options
All
  • Public
  • Public/Protected
  • All
Menu

Concurrent and distributed set.

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(entry: E): Promise<boolean>
  • Adds the specified element to this set if not already present.

    Parameters

    • entry: E

    Returns Promise<boolean>

    a promise to be resolved to true if this set did not contain the element.

  • addAll(items: E[]): Promise<boolean>
  • Adds the elements in the array items to this set if not already present. At the end, the set contains all elements of items array and its previous elements.

    Parameters

    • items: E[]

    Returns Promise<boolean>

    true if this set changed, false otherwise.

  • addItemListener(listener: ItemListener<E>, includeValue: boolean): Promise<string>
  • Adds an item listener for this set. Listener will be invoked for any add/remove item events.

    Parameters

    • listener: ItemListener<E>
    • 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 set.

    Returns Promise<void>

  • contains(entry: E): Promise<boolean>
  • Checks whether this set contains the given element.

    Parameters

    • entry: E

    Returns Promise<boolean>

    true if this set contains the given element, false otherwise.

  • containsAll(items: E[]): Promise<boolean>
  • Checks whether this set contains all elements of given array.

    Parameters

    • items: E[]

    Returns Promise<boolean>

    true if this set contains all elements of given collection, false otherwise.

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

    Returns Promise<void>

  • 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
  • isEmpty(): Promise<boolean>
  • Returns Promise<boolean>

    true if this set does n Checks if this set has any elements.ot have any elements, false otherwise.

  • remove(entry: E): Promise<boolean>
  • Removes given entry from this set.

    Parameters

    • entry: E

    Returns Promise<boolean>

    true if this set actually had given element, false otherwise.

  • removeAll(items: E[]): Promise<boolean>
  • Removes all elements of given array from this set.

    Parameters

    • items: E[]

    Returns Promise<boolean>

    true if this set changed.

  • removeItemListener(registrationId: string): Promise<boolean>
  • Removes an item listener for this set.

    Parameters

    • registrationId: string

      Registration id of the listener to be removed.

    Returns Promise<boolean>

    true if the item listener is removed, false otherwise.

  • retainAll(items: E[]): Promise<boolean>
  • Removes all elements from this set except the elements of given array.

    Parameters

    • items: E[]

    Returns Promise<boolean>

    true if this set changed.

  • size(): Promise<number>
  • Returns the size of this set.

    Returns Promise<number>

    number of elements in this set.

  • toArray(): Promise<E[]>
  • Returns an array containing all of the elements in the set.

    Returns Promise<E[]>

    An array of items.

Generated using TypeDoc