| Package | Description |
|---|---|
| io.atomix.core.map |
Atomic map primitive.
|
| io.atomix.core.multimap |
Atomic multimap primitive.
|
| io.atomix.core.tree |
Distributed tree primitive interfaces.
|
| io.atomix.utils.time |
Provides classes and interfaces for representing and operating on both logical and physical representations of time.
|
| Modifier and Type | Method and Description |
|---|---|
Versioned<V> |
AtomicMap.compute(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).
|
Versioned<V> |
AtomicMap.computeIf(K key,
Predicate<? super V> condition,
BiFunction<? super K,? super V,? extends V> remappingFunction)
If the value for the specified key satisfies a condition, attempts to compute a new
mapping given the key and its current mapped value.
|
Versioned<V> |
AtomicMap.computeIfAbsent(K key,
Function<? super K,? extends V> mappingFunction)
If the specified key is not already associated with a value (or is mapped to null),
attempts to compute its value using the given mapping function and enters it into
this map unless null.
|
Versioned<V> |
AtomicMap.computeIfPresent(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction)
If the value for the specified key is present and non-null, attempts to compute a new
mapping given the key and its current mapped value.
|
Versioned<V> |
AtomicMap.get(K key)
Returns the value (and version) to which the specified key is mapped, or null if this
map contains no mapping for the key.
|
Versioned<V> |
AtomicMap.getOrDefault(K key,
V defaultValue)
Returns the value (and version) to which the specified key is mapped, or the provided
default value if this map contains no mapping for the key.
|
Versioned<V> |
AtomicMapEvent.newValue()
Returns the new value in the map associated with the key.
|
Versioned<V> |
AtomicMapEvent.oldValue()
Returns the value associated with the key, before it was updated.
|
default Versioned<V> |
AtomicMap.put(K key,
V value)
Associates the specified value with the specified key in this map (optional operation).
|
Versioned<V> |
AtomicMap.put(K key,
V value,
Duration ttl)
Associates the specified value with the specified key in this map (optional operation).
|
default Versioned<V> |
AtomicMap.putAndGet(K key,
V value)
Associates the specified value with the specified key in this map (optional operation).
|
Versioned<V> |
AtomicMap.putAndGet(K key,
V value,
Duration ttl)
Associates the specified value with the specified key in this map (optional operation).
|
default Versioned<V> |
AtomicMap.putIfAbsent(K key,
V value)
If the specified key is not already associated with a value
associates it with the given value and returns null, else returns the current value.
|
Versioned<V> |
AtomicMap.putIfAbsent(K key,
V value,
Duration ttl)
If the specified key is not already associated with a value
associates it with the given value and returns null, else returns the current value.
|
Versioned<V> |
AtomicMap.remove(K key)
Removes the mapping for a key from this map if it is present (optional operation).
|
Versioned<V> |
AtomicMap.replace(K key,
V value)
Replaces the entry for the specified key only if there is any value
which associated with specified key.
|
| Modifier and Type | Method and Description |
|---|---|
Map.Entry<K,Versioned<V>> |
AtomicNavigableMap.ceilingEntry(K key)
Returns the entry associated with the least key greater than or equal to the key.
|
CompletableFuture<Map.Entry<K,Versioned<V>>> |
AsyncAtomicNavigableMap.ceilingEntry(K key)
Returns a key-value mapping associated with the least key
greater than or equal to the given key, or
null if
there is no such key. |
default CompletableFuture<Versioned<V>> |
AsyncAtomicMap.compute(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).
|
CompletableFuture<Versioned<V>> |
AsyncAtomicMap.computeIf(K key,
Predicate<? super V> condition,
BiFunction<? super K,? super V,? extends V> remappingFunction)
If the value for the specified key satisfies a condition, attempts to compute a new
mapping given the key and its current mapped value.
|
default CompletableFuture<Versioned<V>> |
AsyncAtomicMap.computeIfAbsent(K key,
Function<? super K,? extends V> mappingFunction)
If the specified key is not already associated with a value (or is mapped to null),
attempts to compute its value using the given mapping function and enters it into
this map unless null.
|
default CompletableFuture<Versioned<V>> |
AsyncAtomicMap.computeIfPresent(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction)
If the value for the specified key is present and non-null, attempts to compute a new
mapping given the key and its current mapped value.
|
DistributedSet<Map.Entry<K,Versioned<V>>> |
AtomicMap.entrySet()
Returns the set of entries contained in this map.
|
AsyncDistributedSet<Map.Entry<K,Versioned<V>>> |
AsyncAtomicMap.entrySet()
Returns the set of entries contained in this map.
|
Map.Entry<K,Versioned<V>> |
AtomicNavigableMap.firstEntry()
Returns the entry associated with the lowest key in the map.
|
CompletableFuture<Map.Entry<K,Versioned<V>>> |
AsyncAtomicNavigableMap.firstEntry()
Returns a key-value mapping associated with the least
key in this map, or
null if the map is empty. |
Map.Entry<K,Versioned<V>> |
AtomicNavigableMap.floorEntry(K key)
Returns the entry associated with the greatest key less than or equal to key.
|
CompletableFuture<Map.Entry<K,Versioned<V>>> |
AsyncAtomicNavigableMap.floorEntry(K key)
Returns a key-value mapping associated with the greatest key
less than or equal to the given key, or
null if there
is no such key. |
CompletableFuture<Versioned<V>> |
AsyncAtomicMap.get(K key)
Returns the value (and version) to which the specified key is mapped, or null if this
map contains no mapping for the key.
|
Map<K,Versioned<V>> |
AtomicMap.getAllPresent(Iterable<K> keys)
Returns a map of the values associated with the
keys in this map. |
CompletableFuture<Map<K,Versioned<V>>> |
AsyncAtomicMap.getAllPresent(Iterable<K> keys)
Returns a map of the values associated with the
keys in this map. |
CompletableFuture<Versioned<V>> |
AsyncAtomicMap.getOrDefault(K key,
V defaultValue)
Returns the value (and version) to which the specified key is mapped, or the provided
default value if this map contains no mapping for the key.
|
Map.Entry<K,Versioned<V>> |
AtomicNavigableMap.higherEntry(K key)
Returns the entry associated with the lest key greater than key.
|
CompletableFuture<Map.Entry<K,Versioned<V>>> |
AsyncAtomicNavigableMap.higherEntry(K key)
Returns a key-value mapping associated with the least key
strictly greater than the given key, or
null if there
is no such key. |
Map.Entry<K,Versioned<V>> |
AtomicNavigableMap.lastEntry()
Returns the entry associated with the highest key in the map.
|
CompletableFuture<Map.Entry<K,Versioned<V>>> |
AsyncAtomicNavigableMap.lastEntry()
Returns a key-value mapping associated with the greatest
key in this map, or
null if the map is empty. |
Map.Entry<K,Versioned<V>> |
AtomicNavigableMap.lowerEntry(K key)
Returns the entry associated with the largest key less than key.
|
CompletableFuture<Map.Entry<K,Versioned<V>>> |
AsyncAtomicNavigableMap.lowerEntry(K key)
Returns a key-value mapping associated with the greatest key
strictly less than the given key, or
null if there is
no such key. |
Map.Entry<K,Versioned<V>> |
AtomicNavigableMap.pollFirstEntry()
Returns the entry associated with the lowest key in the map.
|
CompletableFuture<Map.Entry<K,Versioned<V>>> |
AsyncAtomicNavigableMap.pollFirstEntry()
Removes and returns a key-value mapping associated with
the least key in this map, or
null if the map is empty. |
Map.Entry<K,Versioned<V>> |
AtomicNavigableMap.pollLastEntry()
Returns the entry associated with the highest key in the map.
|
CompletableFuture<Map.Entry<K,Versioned<V>>> |
AsyncAtomicNavigableMap.pollLastEntry()
Removes and returns a key-value mapping associated with
the greatest key in this map, or
null if the map is empty. |
default CompletableFuture<Versioned<V>> |
AsyncAtomicMap.put(K key,
V value)
Associates the specified value with the specified key in this map (optional operation).
|
CompletableFuture<Versioned<V>> |
AsyncAtomicMap.put(K key,
V value,
Duration ttl)
Associates the specified value with the specified key in this map (optional operation).
|
default CompletableFuture<Versioned<V>> |
AsyncAtomicMap.putAndGet(K key,
V value)
Associates the specified value with the specified key in this map (optional operation).
|
CompletableFuture<Versioned<V>> |
AsyncAtomicMap.putAndGet(K key,
V value,
Duration ttl)
Associates the specified value with the specified key in this map (optional operation).
|
default CompletableFuture<Versioned<V>> |
AsyncAtomicMap.putIfAbsent(K key,
V value)
If the specified key is not already associated with a value associates
it with the given value and returns null, else behaves as a get
returning the existing mapping without making any changes.
|
CompletableFuture<Versioned<V>> |
AsyncAtomicMap.putIfAbsent(K key,
V value,
Duration ttl)
If the specified key is not already associated with a value associates
it with the given value and returns null, else behaves as a get
returning the existing mapping without making any changes.
|
CompletableFuture<Versioned<V>> |
AsyncAtomicMap.remove(K key)
Removes the mapping for a key from this map if it is present (optional operation).
|
CompletableFuture<Versioned<V>> |
AsyncAtomicMap.replace(K key,
V value)
Replaces the entry for the specified key only if there is any value
which associated with specified key.
|
DistributedCollection<Versioned<V>> |
AtomicMap.values()
Returns the collection of values (and associated versions) contained in this map.
|
AsyncDistributedCollection<Versioned<V>> |
AsyncAtomicMap.values()
Returns the collection of values (and associated versions) contained in this map.
|
| Constructor and Description |
|---|
AtomicMapEvent(AtomicMapEvent.Type type,
K key,
Versioned<V> currentValue,
Versioned<V> previousValue)
Creates a new event object.
|
AtomicMapEvent(AtomicMapEvent.Type type,
K key,
Versioned<V> currentValue,
Versioned<V> previousValue)
Creates a new event object.
|
| Modifier and Type | Method and Description |
|---|---|
Versioned<Collection<V>> |
AtomicMultimap.get(K key)
Returns a collection of values associated with the specified key, if the
key is not in the map it will return an empty collection.
|
Versioned<Collection<V>> |
AtomicMultimap.removeAll(K key)
Removes all values associated with the specified key as well as the key
itself.
|
Versioned<Collection<V>> |
AtomicMultimap.replaceValues(K key,
Collection<V> values)
Stores all the values in values associated with the key specified,
removes all preexisting values and returns a collection of the removed
values which may be empty if the entry did not exist.
|
| Modifier and Type | Method and Description |
|---|---|
DistributedMap<K,Versioned<Collection<V>>> |
AtomicMultimap.asMap()
Returns the multimap as a distributed map.
|
AsyncDistributedMap<K,Versioned<Collection<V>>> |
AsyncAtomicMultimap.asMap()
Returns the multimap as a distributed map.
|
CompletableFuture<Versioned<Collection<V>>> |
AsyncAtomicMultimap.get(K key)
Returns a collection of values associated with the specified key, if the
key is not in the map it will return an empty collection.
|
CompletableFuture<Versioned<Collection<V>>> |
AsyncAtomicMultimap.removeAll(K key)
Removes all values associated with the specified key as well as the key
itself.
|
CompletableFuture<Versioned<Collection<V>>> |
AsyncAtomicMultimap.replaceValues(K key,
Collection<V> values)
Stores all the values in values associated with the key specified,
removes all preexisting values and returns a collection of the removed
values which may be empty if the entry did not exist.
|
| Modifier and Type | Method and Description |
|---|---|
Versioned<V> |
AtomicDocumentTree.get(DocumentPath path)
Returns a document tree node.
|
Versioned<V> |
AtomicDocumentTree.removeNode(DocumentPath path)
Removes the node with the specified path.
|
Versioned<V> |
AtomicDocumentTree.set(DocumentPath path,
V value)
Creates or updates a document tree node.
|
Versioned<V> |
DocumentTreeNode.value()
Returns the value of this node.
|
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Versioned<V>> |
AsyncAtomicDocumentTree.get(DocumentPath path)
Returns the value of the tree node at specified path.
|
CompletableFuture<Map<String,Versioned<V>>> |
AsyncAtomicDocumentTree.getChildren(DocumentPath path)
Returns the children of node at specified path in the form of a mapping from child name to child value.
|
Map<String,Versioned<V>> |
AtomicDocumentTree.getChildren(DocumentPath path)
Returns the child values for this node.
|
Optional<Versioned<V>> |
DocumentTreeEvent.newValue()
Returns the new value.
|
Optional<Versioned<V>> |
DocumentTreeEvent.oldValue()
Returns the old value.
|
CompletableFuture<Versioned<V>> |
AsyncAtomicDocumentTree.removeNode(DocumentPath path)
Removes the node with the specified path.
|
CompletableFuture<Versioned<V>> |
AsyncAtomicDocumentTree.set(DocumentPath path,
V value)
Creates or updates a document tree node.
|
| Constructor and Description |
|---|
DocumentTreeEvent(DocumentTreeEvent.Type type,
DocumentPath path,
Optional<Versioned<V>> newValue,
Optional<Versioned<V>> oldValue)
Constructs a new
DocumentTreeEvent. |
DocumentTreeEvent(DocumentTreeEvent.Type type,
DocumentPath path,
Optional<Versioned<V>> newValue,
Optional<Versioned<V>> oldValue)
Constructs a new
DocumentTreeEvent. |
| Modifier and Type | Method and Description |
|---|---|
<U> Versioned<U> |
Versioned.map(Function<V,U> transformer)
Maps this instance into another after transforming its
value while retaining the same version and creationTime.
|
| Modifier and Type | Method and Description |
|---|---|
static <U> U |
Versioned.valueOrElse(Versioned<U> versioned,
U defaultValue)
Returns the value of the specified Versioned object if non-null or else returns
a default value.
|
static <U> U |
Versioned.valueOrNull(Versioned<U> versioned)
Returns the value of the specified Versioned object if non-null or else returns null.
|
Copyright © 2013–2018. All rights reserved.