Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ReplicatedMap<K, V>

Type parameters

  • K

  • V

Hierarchy

Implemented by

Index

Methods

addEntryListener

  • addEntryListener(listener: EntryListener<K, V>): Promise<string>
  • Adds an entry listener for this map. The listener will be notified for all map add/remove/update/evict events.

    Parameters

    Returns Promise<string>

    Registration id of the listener.

addEntryListenerToKey

  • addEntryListenerToKey(listener: EntryListener<K, V>, key: K): Promise<string>
  • Adds the specified entry listener for the specified key. The listener will be notified for all add/remove/update/evict events of the specified key only.

    Parameters

    Returns Promise<string>

    Registration id of the listener.

addEntryListenerToKeyWithPredicate

  • addEntryListenerToKeyWithPredicate(listener: EntryListener<K, V>, key: K, predicate: Predicate): Promise<string>
  • Adds an continuous entry listener for this map. The listener will be notified for map add/remove/update/evict events filtered by the given predicate.

    Parameters

    Returns Promise<string>

    Registration id of the listener.

addEntryListenerWithPredicate

  • Adds an continuous entry listener for this map. The listener will be notified for map add/remove/update/evict events filtered by the given predicate.

    Parameters

    Returns Promise<string>

    Registration id of the listener.

clear

  • clear(): Promise<void>
  • The clear operation wipes data out of the replicated maps. If some node fails on executing the operation, it is retried for at most 5 times (on the failing nodes only).

    Returns Promise<void>

containsKey

  • containsKey(key: K): Promise<boolean>
  • Returns true if this map contains a mapping for the specified key. This message is idempotent.

    Parameters

    • key: K

      key to search for.

    Returns Promise<boolean>

    true if this map contains the specified key, false otherwise.

containsValue

  • containsValue(value: V): Promise<boolean>
  • Returns true if this map maps one or more keys to the specified value.

    Parameters

    • value: V

      value to search for.

    Returns Promise<boolean>

    true if the specified value is associated with at least one key.

destroy

  • destroy(): Promise<void>

entrySet

  • entrySet(): Promise<Array<[K, V]>>

get

  • get(key: K): Promise<V>
  • Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

    If this map permits null values, then a return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The #containsKey operation may be used to distinguish these two cases. This message is idempotent.

    Parameters

    • key: K

      key to search for.

    Returns Promise<V>

    value associated with the specified key.

getName

  • getName(): string

getPartitionKey

  • getPartitionKey(): string

getServiceName

  • getServiceName(): string

isEmpty

  • isEmpty(): Promise<boolean>

keySet

  • keySet(): Promise<K[]>
  • Returns a view of the key contained in this map.

    Returns Promise<K[]>

    keys of this map as an array.

put

  • put(key: K, value: V, ttl?: Long | number): Promise<V>
  • Associates a given value to the specified key and replicates it to the cluster. If there is an old value, it will be replaced by the specified one and returned from the call.

    Parameters

    • key: K

      key with which the specified value is to be associated.

    • value: V

      value to be associated with the specified key.

    • Optional ttl: Long | number

      milliseconds to be associated with the specified key-value pair.

    Returns Promise<V>

    old value if there was any, null otherwise.

putAll

  • putAll(pairs: Array<[K, V]>): Promise<void>
  • Copies all of the mappings from the specified key-value pairs array to this map (optional operation). The effect of this call is equivalent to that of calling put(Object,Object) put(k, v) on this map once for each mapping from key k to value v in the specified map. The behavior of this operation is undefined if the specified map is modified while the operation is in progress

    Parameters

    • pairs: Array<[K, V]>

    Returns Promise<void>

remove

  • remove(key: K): Promise<V>
  • Removes the mapping for a key from this map if it is present (optional operation). Returns the value to which this map previously associated the key, or null if the map contained no mapping for the key. If this map permits null values, then a return value of null does not necessarily indicate that the map contained no mapping for the key; it's also possible that the map explicitly mapped the key to null. The map will not contain a mapping for the specified key once the call returns.

    Parameters

    • key: K

      key to remove.

    Returns Promise<V>

    value associated with key, null if the key did not exist before.

removeEntryListener

  • removeEntryListener(listenerId: string): Promise<boolean>
  • Removes the specified entry listener. Returns silently if there was no such listener added before. This message is idempotent.

    Parameters

    • listenerId: string

    Returns Promise<boolean>

    true if remove operation is successful, false if unsuccessful or this listener did not exist.

size

  • size(): Promise<number>
  • If the map contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

    Returns Promise<number>

    Returns the number of key-value mappings in this map.

values

Generated using TypeDoc