public interface AsyncAtomicSortedMap<K extends Comparable<K>,V> extends AsyncAtomicMap<K,V>
DEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<K> |
firstKey()
Returns the first (lowest) key currently in this map.
|
AsyncAtomicSortedMap<K,V> |
headMap(K toKey)
Returns a view of the portion of this map whose keys are strictly less than
toKey. |
CompletableFuture<K> |
lastKey()
Returns the last (highest) key currently in this map.
|
AsyncAtomicSortedMap<K,V> |
subMap(K fromKey,
K toKey)
Returns a view of the portion of this map whose keys range from
fromKey, inclusive, to toKey,
exclusive. |
default AtomicSortedMap<K,V> |
sync()
Returns a synchronous wrapper around the asynchronous primitive.
|
AtomicSortedMap<K,V> |
sync(Duration operationTimeout)
Returns a synchronous wrapper around the asynchronous primitive.
|
AsyncAtomicSortedMap<K,V> |
tailMap(K fromKey)
Returns a view of the portion of this map whose keys are greater than or equal to
fromKey. |
addListener, addListener, clear, compute, computeIf, computeIfAbsent, computeIfPresent, containsKey, containsValue, delete, entrySet, get, getAllPresent, getOrDefault, isEmpty, keySet, put, put, putAndGet, putAndGet, putIfAbsent, putIfAbsent, remove, remove, remove, removeListener, replace, replace, replace, size, valuescloseaddStateChangeListener, name, protocol, removeStateChangeListener, typecommit, prepare, rollbackCompletableFuture<K> firstKey()
NoSuchElementException - if this map is emptyCompletableFuture<K> lastKey()
NoSuchElementException - if this map is emptyAsyncAtomicSortedMap<K,V> subMap(K fromKey, K toKey)
fromKey, inclusive, to toKey,
exclusive. (If fromKey and toKey are equal, the returned map is empty.) The returned map is
backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map
supports all optional map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
fromKey - low endpoint (inclusive) of the keys in the returned maptoKey - high endpoint (exclusive) of the keys in the returned mapfromKey, inclusive, to toKey,
exclusiveClassCastException - if fromKey and toKey cannot be compared to one another using this
map's comparator (or, if the map has no comparator, using natural ordering). Implementations may, but are not
required to, throw this exception if fromKey or toKey cannot be compared to keys currently in
the map.NullPointerException - if fromKey or toKey is null and this map does not permit null
keysIllegalArgumentException - if fromKey is greater than toKey; or if this map itself has a
restricted range, and fromKey or toKey lies outside the bounds of the rangeAsyncAtomicSortedMap<K,V> headMap(K toKey)
toKey. The returned map is
backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map
supports all optional map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
toKey - high endpoint (exclusive) of the keys in the returned maptoKeyClassCastException - if toKey is not compatible with this map's comparator (or, if the map has no
comparator, if toKey does not implement Comparable). Implementations may, but are not required
to, throw this exception if toKey cannot be compared to keys currently in the map.NullPointerException - if toKey is null and this map does not permit null keysIllegalArgumentException - if this map itself has a restricted range, and toKey lies outside the
bounds of the rangeAsyncAtomicSortedMap<K,V> tailMap(K fromKey)
fromKey. The returned
map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned
map supports all optional map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
fromKey - low endpoint (inclusive) of the keys in the returned mapfromKeyClassCastException - if fromKey is not compatible with this map's comparator (or, if the map has
no comparator, if fromKey does not implement Comparable). Implementations may, but are not
required to, throw this exception if fromKey cannot be compared to keys currently in the map.NullPointerException - if fromKey is null and this map does not permit null keysIllegalArgumentException - if this map itself has a restricted range, and fromKey lies outside
the bounds of the rangedefault AtomicSortedMap<K,V> sync()
AsyncPrimitivesync in interface AsyncAtomicMap<K extends Comparable<K>,V>sync in interface AsyncPrimitiveAtomicSortedMap<K,V> sync(Duration operationTimeout)
AsyncPrimitivesync in interface AsyncAtomicMap<K extends Comparable<K>,V>sync in interface AsyncPrimitiveoperationTimeout - the synchronous operation timeoutCopyright © 2013–2018. All rights reserved.