Package org.onosproject.store.service
Interface ConsistentTreeMap<V>
-
- All Superinterfaces:
ConsistentMap<String,V>
,DistributedPrimitive
,Iterable<Map.Entry<String,Versioned<V>>>
- All Known Implementing Classes:
DefaultConsistentTreeMap
public interface ConsistentTreeMap<V> extends ConsistentMap<String,V>
Tree map interface counterpart toAsyncConsistentTreeMap
.
-
-
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 Modifier and Type Method Description Map.Entry<String,Versioned<V>>
ceilingEntry(String key)
Returns the entry associated with the least key greater than or equal to the key.String
ceilingKey(String key)
Returns the lowest key greater than or equal to key.Map.Entry<String,Versioned<V>>
firstEntry()
Returns the entry associated with the lowest key in the map.String
firstKey()
Returns the lowest key in the map.Map.Entry<String,Versioned<V>>
floorEntry(String key)
Returns the entry associated with the greatest key less than or equal to key.String
floorKey(String key)
Returns the entry associated with the highest key less than or equal to key.Map.Entry<String,Versioned<V>>
higherEntry(String key)
Returns the entry associated with the lest key greater than key.String
higherKey(String key)
Returns the lowest key greater than key.Map.Entry<String,Versioned<V>>
lastEntry()
Returns the entry associated with the highest key in the map.String
lastKey()
Returns the highest key in the map.Map.Entry<String,Versioned<V>>
lowerEntry(String key)
Returns the entry associated with the largest key less than key.String
lowerKey(String key)
Returns the entry associated with the greatest key less than key.NavigableSet<String>
navigableKeySet()
Returns a navigable set of the keys in this map.Map.Entry<String,Versioned<V>>
pollFirstEntry()
Returns and removes the entry associated with the lowest key.Map.Entry<String,Versioned<V>>
pollLastEntry()
Returns and removes the entry associated with the highest key.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.ConsistentMap
addListener, addListener, asJavaMap, clear, compute, computeIf, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, get, getOrDefault, isEmpty, keySet, put, putAndGet, putIfAbsent, remove, remove, remove, removeListener, replace, replace, replace, size, stream, values
-
Methods inherited from interface org.onosproject.store.service.DistributedPrimitive
addStatusChangeListener, applicationId, destroy, name, primitiveType, removeStatusChangeListener, statusChangeListeners
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
firstKey
String firstKey()
Returns the lowest key in the map.- Returns:
- the key or null if none exist
-
lastKey
String lastKey()
Returns the highest key in the map.- Returns:
- the key or null if none exist
-
ceilingEntry
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
-
floorEntry
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
-
higherEntry
Map.Entry<String,Versioned<V>> higherEntry(String key)
Returns the entry associated with the lest key greater than key.- Parameters:
key
- the key- Returns:
- the entry or null
-
lowerEntry
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
-
firstEntry
Map.Entry<String,Versioned<V>> firstEntry()
Returns the entry associated with the lowest key in the map.- Returns:
- the entry or null
-
lastEntry
Map.Entry<String,Versioned<V>> lastEntry()
Returns the entry associated with the highest key in the map.- Returns:
- the entry or null
-
pollFirstEntry
Map.Entry<String,Versioned<V>> pollFirstEntry()
Returns and removes the entry associated with the lowest key.- Returns:
- the entry or null
-
pollLastEntry
Map.Entry<String,Versioned<V>> pollLastEntry()
Returns and removes the entry associated with the highest key.- Returns:
- the entry or null
-
lowerKey
String lowerKey(String key)
Returns the entry associated with the greatest key less than key.- Parameters:
key
- the key- Returns:
- the entry or null
-
floorKey
String floorKey(String key)
Returns the entry associated with the highest key less than or equal to key.- Parameters:
key
- the key- Returns:
- the entry or null
-
ceilingKey
String ceilingKey(String key)
Returns the lowest key greater than or equal to key.- Parameters:
key
- the key- Returns:
- the key or null
-
higherKey
String higherKey(String key)
Returns the lowest key greater than key.- Parameters:
key
- the key- Returns:
- the key or null
-
navigableKeySet
NavigableSet<String> navigableKeySet()
Returns a navigable set of the keys in this map.- Returns:
- a navigable key set
-
subMap
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)
-
-