Adds the specified element to this set if not already present.
Returns
a promise to be resolved to true if this set did not contain the element.
Parameters
entry: E
Returns Promise<boolean>
addAll
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.
true if updated item should be included in the event.
Returns Promise<string>
clear
clear(): Promise<void>
Removes all of the elements from this set.
Returns Promise<void>
contains
contains(entry: E): Promise<boolean>
Checks whether this set contains the given element.
Returns
true if this set contains the given element, false otherwise.
Parameters
entry: E
Returns Promise<boolean>
containsAll
containsAll(items: E[]): Promise<boolean>
Checks whether this set contains all elements of given array.
Returns
true if this set contains all elements of given collection, false otherwise.
Parameters
items: E[]
Returns Promise<boolean>
destroy
destroy(): Promise<void>
Destroys this object cluster-wide.
Clears all resources taken for this object.
Returns Promise<void>
getName
getName(): string
Returns the unique name of this object.
Returns string
getPartitionKey
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
getServiceName(): string
Returns the service name for this object.
Returns string
isEmpty
isEmpty(): Promise<boolean>
Returns
true if this set does n
Checks if this set has any elements.ot have any elements, false otherwise.
Returns Promise<boolean>
remove
remove(entry: E): Promise<boolean>
Removes given entry from this set.
Returns
true if this set actually had given element, false otherwise.
Parameters
entry: E
Returns Promise<boolean>
removeAll
removeAll(items: E[]): Promise<boolean>
Removes all elements of given array from this set.
Concurrent and distributed set.
Methods that require serialization/deserialization may throw RangeError, e.g when there is no suitable serializer for a certain type.