ReliableHashMap<K,V> Class
Definition
- java.lang.Object
- microsoft.servicefabric.data.collections.ReliableCollectionsNativeAPIs
- microsoft.servicefabric.data.collections.ReliableHashMap<K,V>
public class ReliableHashMap<K extends String,V> implements ReliableCollection
Type Parameters
- K
- V
Constructors
| ReliableHashMap(long store, long replicaId, String name, String traceId) |
Methods
| clearAsync() |
Removes all state from the ReliableCollection, including replicated and persisted store. |
| close() | |
| computeAsync(Transaction txn, K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) |
Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping). |
| computeAsync(Transaction txn, K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, Duration timeout, CancellationToken cancellationToken) |
Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping). |
| computeIfAbsentAsync(Transaction txn, K key, Function<? super K, ? extends V> mappingFunction) |
If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless null. |
| computeIfAbsentAsync(Transaction txn, K key, Function<? super K, ? extends V> mappingFunction, Duration timeout, CancellationToken cancellationToken) |
If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless null. |
| computeIfPresentAsync(Transaction txn, K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) |
If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value. |
| computeIfPresentAsync(Transaction txn, K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, Duration timeout, CancellationToken cancellationToken) |
If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value. |
| containsKeyAsync(Transaction txn, K key) |
Tests if the specified object is a key in this table. |
| containsKeyAsync(Transaction txn, K key, Duration timeout, CancellationToken cancellationToken) |
Tests if the specified object is a key in this table. |
| containsKeyAsync(Transaction txn, K key, LockMode lockMode) |
Tests if the specified object is a key in this table. |
| containsKeyAsync(Transaction txn, K key, LockMode lockMode, Duration timeout, CancellationToken cancellationToken) |
Tests if the specified object is a key in this table. |
| elementsAsync(Transaction txn) |
Returns an enumeration of the values in this table. |
| getAsync(Transaction txn, K key) |
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. |
| getAsync(Transaction txn, K key, Duration timeout, CancellationToken cancellationToken) |
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. |
| getCount() |
Gets the number of elements contained in the ReliableCollection |
| getName() |
Gets the unique URI name for the Reliable HashMap |
| keysAsync(Transaction txn) |
Returns an enumeration of the keys in this table. |
| keyValuesAsync(Transaction txn) |
Returns an enumeration of the key-value pairs in this table. |
| putAsync(Transaction txn, K key, V value) |
Maps the specified key to the specified value in this table. Neither the key nor the value can be null. |
| putAsync(Transaction txn, K key, V value, Duration timeout, CancellationToken cancellationToken) |
Maps the specified key to the specified value in this table. Neither the key nor the value can be null. |
| putIfAbsentAsync(Transaction txn, K key, V value) |
If the specified key is not already associated with a value, associate it with the given value. |
| putIfAbsentAsync(Transaction txn, K key, V value, Duration timeout, CancellationToken cancellationToken) |
If the specified key is not already associated with a value, associate it with the given value. |
| removeAsync(Transaction txn, K key) |
Removes the key (and its corresponding value) from this map. This method does nothing if the key is not in the map. |
| removeAsync(Transaction txn, K key, Duration timeout, CancellationToken cancellationToken) |
Removes the key (and its corresponding value) from this map. This method does nothing if the key is not in the map. |
| replaceAsync(Transaction txn, K key, V value) |
Replaces the entry for a key only if currently mapped to some value. |
| replaceAsync(Transaction txn, K key, V value, Duration timeout, CancellationToken cancellationToken) |
Replaces the entry for a key only if currently mapped to some value. |
| size() |
Returns the number of mappings. |