Package org.onosproject.store.service
Interface AsyncConsistentTreeMap<V>
-
- All Superinterfaces:
AsyncConsistentMap<String,V>
,AsyncIterable<Map.Entry<String,Versioned<V>>>
,DistributedPrimitive
,Transactional<MapUpdate<String,V>>
public interface AsyncConsistentTreeMap<V> extends AsyncConsistentMap<String,V>
API for a distributed tree map implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.onosproject.store.service.DistributedPrimitive
DistributedPrimitive.Status, DistributedPrimitive.Type
-
-
Field Summary
-
Fields inherited from interface org.onosproject.store.service.DistributedPrimitive
DEFAULT_OPERATION_TIMEOUT_MILLIS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ConsistentTreeMap<V>
asTreeMap()
default ConsistentTreeMap<V>
asTreeMap(long timeoutMillis)
CompletableFuture<Map.Entry<String,Versioned<V>>>
ceilingEntry(String key)
Returns the entry associated with the least key greater than or equal to the key.CompletableFuture<String>
ceilingKey(String key)
Return the lowest key greater than or equal to key.CompletableFuture<Map.Entry<String,Versioned<V>>>
firstEntry()
Return the entry associated with the lowest key in the map.CompletableFuture<String>
firstKey()
Return the lowest key in the map.CompletableFuture<Map.Entry<String,Versioned<V>>>
floorEntry(String key)
Returns the entry associated with the greatest key less than or equal to key.CompletableFuture<String>
floorKey(String key)
Return the highest key less than or equal to key.CompletableFuture<Map.Entry<String,Versioned<V>>>
higherEntry(String key)
Returns the entry associated with the least key greater than key.CompletableFuture<String>
higherKey(String key)
Return the lowest key greater than key.CompletableFuture<Map.Entry<String,Versioned<V>>>
lastEntry()
Return the entry associated with the highest key in the map.CompletableFuture<String>
lastKey()
Return the highest key in the map.CompletableFuture<Map.Entry<String,Versioned<V>>>
lowerEntry(String key)
Returns the entry associated with the largest key less than key.CompletableFuture<String>
lowerKey(String key)
Return the entry associated with the greatest key less than key.CompletableFuture<NavigableSet<String>>
navigableKeySet()
Returns a navigable set of the keys in this map.CompletableFuture<Map.Entry<String,Versioned<V>>>
pollFirstEntry()
Return and remove the entry associated with the lowest key.CompletableFuture<Map.Entry<String,Versioned<V>>>
pollLastEntry()
Return and remove the entry associated with the highest key.CompletableFuture<NavigableMap<String,V>>
subMap(String upperKey, String lowerKey, boolean inclusiveUpper, boolean inclusiveLower)
Returns a navigable map containing the entries from the original map which are larger than (or if specified equal to)lowerKey
AND less than (or if specified equal to)upperKey
.-
Methods inherited from interface org.onosproject.store.service.AsyncConsistentMap
addListener, addListener, asConsistentMap, asConsistentMap, clear, compute, computeIf, computeIfAbsent, computeIfPresent, containsKey, containsValue, destroy, entrySet, get, getOrDefault, isEmpty, keySet, primitiveType, put, putAndGet, putIfAbsent, remove, remove, remove, removeListener, replace, replace, replace, size, values
-
Methods inherited from interface org.onosproject.store.service.AsyncIterable
iterator
-
Methods inherited from interface org.onosproject.store.service.DistributedPrimitive
addStatusChangeListener, applicationId, name, removeStatusChangeListener, statusChangeListeners
-
Methods inherited from interface org.onosproject.store.service.Transactional
begin, commit, prepare, prepareAndCommit, rollback
-
-
-
-
Method Detail
-
firstKey
CompletableFuture<String> firstKey()
Return the lowest key in the map.- Returns:
- the key or null if none exist
-
lastKey
CompletableFuture<String> lastKey()
Return the highest key in the map.- Returns:
- the key or null if none exist
-
ceilingEntry
CompletableFuture<Map.Entry<String,Versioned<V>>> ceilingEntry(String key)
Returns the entry associated with the least key greater than or equal to the key.- Parameters:
key
- the key- Returns:
- the entry or null if no suitable key exists
-
floorEntry
CompletableFuture<Map.Entry<String,Versioned<V>>> floorEntry(String key)
Returns the entry associated with the greatest key less than or equal to key.- Parameters:
key
- the key- Returns:
- the entry or null if no suitable key exists
-
higherEntry
CompletableFuture<Map.Entry<String,Versioned<V>>> higherEntry(String key)
Returns the entry associated with the least key greater than key.- Parameters:
key
- the key- Returns:
- the entry or null if no suitable key exists
-
lowerEntry
CompletableFuture<Map.Entry<String,Versioned<V>>> lowerEntry(String key)
Returns the entry associated with the largest key less than key.- Parameters:
key
- the key- Returns:
- the entry or null if no suitable key exists
-
firstEntry
CompletableFuture<Map.Entry<String,Versioned<V>>> firstEntry()
Return the entry associated with the lowest key in the map.- Returns:
- the entry or null if none exist
-
lastEntry
CompletableFuture<Map.Entry<String,Versioned<V>>> lastEntry()
Return the entry associated with the highest key in the map.- Returns:
- the entry or null if none exist
-
pollFirstEntry
CompletableFuture<Map.Entry<String,Versioned<V>>> pollFirstEntry()
Return and remove the entry associated with the lowest key.- Returns:
- the entry or null if none exist
-
pollLastEntry
CompletableFuture<Map.Entry<String,Versioned<V>>> pollLastEntry()
Return and remove the entry associated with the highest key.- Returns:
- the entry or null if none exist
-
lowerKey
CompletableFuture<String> lowerKey(String key)
Return the entry associated with the greatest key less than key.- Parameters:
key
- the key- Returns:
- the entry or null if no suitable key exists
-
floorKey
CompletableFuture<String> floorKey(String key)
Return the highest key less than or equal to key.- Parameters:
key
- the key- Returns:
- the entry or null if no suitable key exists
-
ceilingKey
CompletableFuture<String> ceilingKey(String key)
Return the lowest key greater than or equal to key.- Parameters:
key
- the key- Returns:
- the entry or null if no suitable key exists
-
higherKey
CompletableFuture<String> higherKey(String key)
Return the lowest key greater than key.- Parameters:
key
- the key- Returns:
- the entry or null if no suitable key exists
-
navigableKeySet
CompletableFuture<NavigableSet<String>> navigableKeySet()
Returns a navigable set of the keys in this map.- Returns:
- a navigable key set (this may be empty)
-
subMap
CompletableFuture<NavigableMap<String,V>> subMap(String upperKey, String lowerKey, boolean inclusiveUpper, boolean inclusiveLower)
Returns a navigable map containing the entries from the original map which are larger than (or if specified equal to)lowerKey
AND less than (or if specified equal to)upperKey
.- Parameters:
upperKey
- the upper bound for the keys in this maplowerKey
- the lower bound for the keys in this mapinclusiveUpper
- whether keys equal to the upperKey should be includedinclusiveLower
- whether keys equal to the lowerKey should be included- Returns:
- a navigable map containing entries in the specified range (this may be empty)
-
asTreeMap
default ConsistentTreeMap<V> asTreeMap()
-
asTreeMap
default ConsistentTreeMap<V> asTreeMap(long timeoutMillis)
-
-