Package org.onosproject.store.service
Interface ConsistentTreeMap<V>
-
- All Superinterfaces:
ConsistentMap<java.lang.String,V>
,DistributedPrimitive
,java.lang.Iterable<java.util.Map.Entry<java.lang.String,Versioned<V>>>
- All Known Implementing Classes:
DefaultConsistentTreeMap
public interface ConsistentTreeMap<V> extends ConsistentMap<java.lang.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 java.util.Map.Entry<java.lang.String,Versioned<V>>
ceilingEntry(java.lang.String key)
Returns the entry associated with the least key greater than or equal to the key.java.lang.String
ceilingKey(java.lang.String key)
Returns the lowest key greater than or equal to key.java.util.Map.Entry<java.lang.String,Versioned<V>>
firstEntry()
Returns the entry associated with the lowest key in the map.java.lang.String
firstKey()
Returns the lowest key in the map.java.util.Map.Entry<java.lang.String,Versioned<V>>
floorEntry(java.lang.String key)
Returns the entry associated with the greatest key less than or equal to key.java.lang.String
floorKey(java.lang.String key)
Returns the entry associated with the highest key less than or equal to key.java.util.Map.Entry<java.lang.String,Versioned<V>>
higherEntry(java.lang.String key)
Returns the entry associated with the lest key greater than key.java.lang.String
higherKey(java.lang.String key)
Returns the lowest key greater than key.java.util.Map.Entry<java.lang.String,Versioned<V>>
lastEntry()
Returns the entry associated with the highest key in the map.java.lang.String
lastKey()
Returns the highest key in the map.java.util.Map.Entry<java.lang.String,Versioned<V>>
lowerEntry(java.lang.String key)
Returns the entry associated with the largest key less than key.java.lang.String
lowerKey(java.lang.String key)
Returns the entry associated with the greatest key less than key.java.util.NavigableSet<java.lang.String>
navigableKeySet()
Returns a navigable set of the keys in this map.java.util.Map.Entry<java.lang.String,Versioned<V>>
pollFirstEntry()
Returns and removes the entry associated with the lowest key.java.util.Map.Entry<java.lang.String,Versioned<V>>
pollLastEntry()
Returns and removes the entry associated with the highest key.java.util.NavigableMap<java.lang.String,V>
subMap(java.lang.String upperKey, java.lang.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
-
-
-
-
Method Detail
-
firstKey
java.lang.String firstKey()
Returns the lowest key in the map.- Returns:
- the key or null if none exist
-
lastKey
java.lang.String lastKey()
Returns the highest key in the map.- Returns:
- the key or null if none exist
-
ceilingEntry
java.util.Map.Entry<java.lang.String,Versioned<V>> ceilingEntry(java.lang.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
java.util.Map.Entry<java.lang.String,Versioned<V>> floorEntry(java.lang.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
java.util.Map.Entry<java.lang.String,Versioned<V>> higherEntry(java.lang.String key)
Returns the entry associated with the lest key greater than key.- Parameters:
key
- the key- Returns:
- the entry or null
-
lowerEntry
java.util.Map.Entry<java.lang.String,Versioned<V>> lowerEntry(java.lang.String key)
Returns the entry associated with the largest key less than key.- Parameters:
key
- the key- Returns:
- the entry or null
-
firstEntry
java.util.Map.Entry<java.lang.String,Versioned<V>> firstEntry()
Returns the entry associated with the lowest key in the map.- Returns:
- the entry or null
-
lastEntry
java.util.Map.Entry<java.lang.String,Versioned<V>> lastEntry()
Returns the entry associated with the highest key in the map.- Returns:
- the entry or null
-
pollFirstEntry
java.util.Map.Entry<java.lang.String,Versioned<V>> pollFirstEntry()
Returns and removes the entry associated with the lowest key.- Returns:
- the entry or null
-
pollLastEntry
java.util.Map.Entry<java.lang.String,Versioned<V>> pollLastEntry()
Returns and removes the entry associated with the highest key.- Returns:
- the entry or null
-
lowerKey
java.lang.String lowerKey(java.lang.String key)
Returns the entry associated with the greatest key less than key.- Parameters:
key
- the key- Returns:
- the entry or null
-
floorKey
java.lang.String floorKey(java.lang.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
java.lang.String ceilingKey(java.lang.String key)
Returns the lowest key greater than or equal to key.- Parameters:
key
- the key- Returns:
- the key or null
-
higherKey
java.lang.String higherKey(java.lang.String key)
Returns the lowest key greater than key.- Parameters:
key
- the key- Returns:
- the key or null
-
navigableKeySet
java.util.NavigableSet<java.lang.String> navigableKeySet()
Returns a navigable set of the keys in this map.- Returns:
- a navigable key set
-
subMap
java.util.NavigableMap<java.lang.String,V> subMap(java.lang.String upperKey, java.lang.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)
-
-