K - key typeV - value typepublic class DefaultDatabaseState<K,V> extends Object implements DatabaseState<K,V>
| Constructor and Description |
|---|
DefaultDatabaseState() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
batchUpdate(List<org.onosproject.store.service.UpdateOperation<K,V>> updates) |
void |
clear(String tableName) |
boolean |
containsKey(String tableName,
K key) |
boolean |
containsValue(String tableName,
V value) |
Set<Map.Entry<K,org.onosproject.store.service.Versioned<V>>> |
entrySet(String tableName) |
org.onosproject.store.service.Versioned<V> |
get(String tableName,
K key) |
void |
init(net.kuujo.copycat.state.StateContext<DatabaseState<K,V>> context)
Initializes the database state.
|
boolean |
isEmpty(String tableName) |
Set<K> |
keySet(String tableName) |
org.onosproject.store.service.Versioned<V> |
put(String tableName,
K key,
V value) |
org.onosproject.store.service.Versioned<V> |
putIfAbsent(String tableName,
K key,
V value) |
org.onosproject.store.service.Versioned<V> |
remove(String tableName,
K key) |
boolean |
remove(String tableName,
K key,
long version) |
boolean |
remove(String tableName,
K key,
V value) |
boolean |
replace(String tableName,
K key,
long oldVersion,
V newValue) |
boolean |
replace(String tableName,
K key,
V oldValue,
V newValue) |
int |
size(String tableName) |
Collection<org.onosproject.store.service.Versioned<V>> |
values(String tableName) |
public void init(net.kuujo.copycat.state.StateContext<DatabaseState<K,V>> context)
DatabaseStateinit in interface DatabaseState<K,V>context - The map state context.public int size(String tableName)
size in interface DatabaseState<K,V>public boolean isEmpty(String tableName)
isEmpty in interface DatabaseState<K,V>public boolean containsKey(String tableName, K key)
containsKey in interface DatabaseState<K,V>public boolean containsValue(String tableName, V value)
containsValue in interface DatabaseState<K,V>public org.onosproject.store.service.Versioned<V> get(String tableName, K key)
get in interface DatabaseState<K,V>public org.onosproject.store.service.Versioned<V> put(String tableName, K key, V value)
put in interface DatabaseState<K,V>public org.onosproject.store.service.Versioned<V> remove(String tableName, K key)
remove in interface DatabaseState<K,V>public void clear(String tableName)
clear in interface DatabaseState<K,V>public Collection<org.onosproject.store.service.Versioned<V>> values(String tableName)
values in interface DatabaseState<K,V>public Set<Map.Entry<K,org.onosproject.store.service.Versioned<V>>> entrySet(String tableName)
entrySet in interface DatabaseState<K,V>public org.onosproject.store.service.Versioned<V> putIfAbsent(String tableName, K key, V value)
putIfAbsent in interface DatabaseState<K,V>public boolean remove(String tableName, K key, V value)
remove in interface DatabaseState<K,V>public boolean remove(String tableName, K key, long version)
remove in interface DatabaseState<K,V>public boolean replace(String tableName, K key, V oldValue, V newValue)
replace in interface DatabaseState<K,V>public boolean replace(String tableName, K key, long oldVersion, V newValue)
replace in interface DatabaseState<K,V>public boolean batchUpdate(List<org.onosproject.store.service.UpdateOperation<K,V>> updates)
batchUpdate in interface DatabaseState<K,V>Copyright © 2015. All rights reserved.