public interface DatabaseProxy<K,V>
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Boolean> |
atomicBatchUpdate(List<org.onosproject.store.service.UpdateOperation<K,V>> updates)
Perform a atomic batch update operation i.e.
|
CompletableFuture<Void> |
clear(String tableName)
Clears the table.
|
CompletableFuture<Boolean> |
containsKey(String tableName,
K key)
Checks whether the table contains a key.
|
CompletableFuture<Boolean> |
containsValue(String tableName,
V value)
Checks whether the table contains a value.
|
CompletableFuture<Set<Map.Entry<K,org.onosproject.store.service.Versioned<V>>>> |
entrySet(String tableName)
Gets a set of entries in the table.
|
CompletableFuture<org.onosproject.store.service.Versioned<V>> |
get(String tableName,
K key)
Gets a value from the table.
|
CompletableFuture<Boolean> |
isEmpty(String tableName)
Checks whether the table is empty.
|
CompletableFuture<Set<K>> |
keySet(String tableName)
Gets a set of keys in the table.
|
CompletableFuture<org.onosproject.store.service.Versioned<V>> |
put(String tableName,
K key,
V value)
Puts a value in the table.
|
CompletableFuture<org.onosproject.store.service.Versioned<V>> |
putIfAbsent(String tableName,
K key,
V value)
Puts a value in the table if the given key does not exist.
|
CompletableFuture<org.onosproject.store.service.Versioned<V>> |
remove(String tableName,
K key)
Removes a value from the table.
|
CompletableFuture<Boolean> |
remove(String tableName,
K key,
long version)
Removes a key and if the existing version for that key matches the specified version.
|
CompletableFuture<Boolean> |
remove(String tableName,
K key,
V value)
Removes a key and if the existing value for that key matches the specified value.
|
CompletableFuture<Boolean> |
replace(String tableName,
K key,
long oldVersion,
V newValue)
Replaces the entry for the specified key only if currently mapped to the specified version.
|
CompletableFuture<Boolean> |
replace(String tableName,
K key,
V oldValue,
V newValue)
Replaces the entry for the specified key only if currently mapped to the specified value.
|
CompletableFuture<Integer> |
size(String tableName)
Gets the table size.
|
CompletableFuture<Collection<org.onosproject.store.service.Versioned<V>>> |
values(String tableName)
Gets a collection of values in the table.
|
CompletableFuture<Integer> size(String tableName)
tableName - table nameCompletableFuture<Boolean> isEmpty(String tableName)
tableName - table nameCompletableFuture<Boolean> containsKey(String tableName, K key)
tableName - table namekey - The key to check.CompletableFuture<Boolean> containsValue(String tableName, V value)
tableName - table namevalue - The value to check.CompletableFuture<org.onosproject.store.service.Versioned<V>> get(String tableName, K key)
tableName - table namekey - The key to get.CompletableFuture<org.onosproject.store.service.Versioned<V>> put(String tableName, K key, V value)
tableName - table namekey - The key to set.value - The value to set.CompletableFuture<org.onosproject.store.service.Versioned<V>> remove(String tableName, K key)
tableName - table namekey - The key to remove.CompletableFuture<Void> clear(String tableName)
tableName - table nameCompletableFuture<Set<K>> keySet(String tableName)
tableName - table nameCompletableFuture<Collection<org.onosproject.store.service.Versioned<V>>> values(String tableName)
tableName - table nameCompletableFuture<Set<Map.Entry<K,org.onosproject.store.service.Versioned<V>>>> entrySet(String tableName)
tableName - table nameCompletableFuture<org.onosproject.store.service.Versioned<V>> putIfAbsent(String tableName, K key, V value)
tableName - table namekey - The key to set.value - The value to set if the given key does not exist.CompletableFuture<Boolean> remove(String tableName, K key, V value)
tableName - table namekey - The key to remove.value - The value to remove.CompletableFuture<Boolean> remove(String tableName, K key, long version)
tableName - table namekey - The key to remove.version - The expected version.CompletableFuture<Boolean> replace(String tableName, K key, V oldValue, V newValue)
tableName - table namekey - The key to replace.oldValue - The value to replace.newValue - The value with which to replace the given key and value.CompletableFuture<Boolean> replace(String tableName, K key, long oldVersion, V newValue)
tableName - table namekey - The key to updateoldVersion - existing version in the map for this replace to succeed.newValue - The value with which to replace the given key and version.CompletableFuture<Boolean> atomicBatchUpdate(List<org.onosproject.store.service.UpdateOperation<K,V>> updates)
updates - list of updates to apply atomically.Copyright © 2015. All rights reserved.