public interface AsyncDistributedSortedMap<K extends Comparable<K>,V> extends AsyncDistributedMap<K,V>
DEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<K> |
firstKey()
Returns the first (lowest) key currently in this map.
|
AsyncDistributedSortedMap<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.
|
AsyncDistributedSortedMap<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 DistributedSortedMap<K,V> |
sync()
Returns a synchronous wrapper around the asynchronous primitive.
|
DistributedSortedMap<K,V> |
sync(Duration operationTimeout)
Returns a synchronous wrapper around the asynchronous primitive.
|
AsyncDistributedSortedMap<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, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, get, getOrDefault, isEmpty, keySet, put, putAll, putIfAbsent, remove, remove, removeListener, replace, replace, size, valuesclose, deleteaddStateChangeListener, name, protocol, removeStateChangeListener, typeCompletableFuture<K> firstKey()
NoSuchElementException - if this map is emptyCompletableFuture<K> lastKey()
NoSuchElementException - if this map is emptyAsyncDistributedSortedMap<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 rangeAsyncDistributedSortedMap<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 rangeAsyncDistributedSortedMap<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 DistributedSortedMap<K,V> sync()
AsyncPrimitivesync in interface AsyncDistributedMap<K extends Comparable<K>,V>sync in interface AsyncPrimitiveDistributedSortedMap<K,V> sync(Duration operationTimeout)
AsyncPrimitivesync in interface AsyncDistributedMap<K extends Comparable<K>,V>sync in interface AsyncPrimitiveoperationTimeout - the synchronous operation timeoutCopyright © 2013–2018. All rights reserved.