public interface DatabaseState<K,V>
| Modifier and Type | Method and Description |
|---|---|
Result<Void> |
clear(String tableName) |
boolean |
commit(org.onosproject.store.service.Transaction transaction) |
boolean |
containsKey(String tableName,
K key) |
boolean |
containsValue(String tableName,
V value) |
Long |
counterAddAndGet(String counterName,
long delta) |
Long |
counterGet(String counterName) |
Long |
counterGetAndAdd(String counterName,
long delta) |
Map<String,Long> |
counters() |
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) |
boolean |
prepare(org.onosproject.store.service.Transaction transaction) |
boolean |
prepareAndCommit(org.onosproject.store.service.Transaction transaction) |
Result<org.onosproject.store.service.Versioned<V>> |
put(String tableName,
K key,
V value) |
Result<UpdateResult<org.onosproject.store.service.Versioned<V>>> |
putAndGet(String tableName,
K key,
V value) |
Result<org.onosproject.store.service.Versioned<V>> |
putIfAbsent(String tableName,
K key,
V value) |
Result<UpdateResult<org.onosproject.store.service.Versioned<V>>> |
putIfAbsentAndGet(String tableName,
K key,
V value) |
Result<org.onosproject.store.service.Versioned<V>> |
remove(String tableName,
K key) |
Result<Boolean> |
remove(String tableName,
K key,
long version) |
Result<Boolean> |
remove(String tableName,
K key,
V value) |
Result<Boolean> |
replace(String tableName,
K key,
long oldVersion,
V newValue) |
Result<Boolean> |
replace(String tableName,
K key,
V oldValue,
V newValue) |
Result<UpdateResult<org.onosproject.store.service.Versioned<V>>> |
replaceAndGet(String tableName,
K key,
long oldVersion,
V newValue) |
boolean |
rollback(org.onosproject.store.service.Transaction transaction) |
int |
size(String tableName) |
Set<String> |
tableNames() |
Collection<org.onosproject.store.service.Versioned<V>> |
values(String tableName) |
void init(net.kuujo.copycat.state.StateContext<DatabaseState<K,V>> context)
context - The map state context.int size(String tableName)
boolean isEmpty(String tableName)
Result<UpdateResult<org.onosproject.store.service.Versioned<V>>> putAndGet(String tableName, K key, V value)
Result<UpdateResult<org.onosproject.store.service.Versioned<V>>> putIfAbsentAndGet(String tableName, K key, V value)
Collection<org.onosproject.store.service.Versioned<V>> values(String tableName)
Result<org.onosproject.store.service.Versioned<V>> putIfAbsent(String tableName, K key, V value)
Result<UpdateResult<org.onosproject.store.service.Versioned<V>>> replaceAndGet(String tableName, K key, long oldVersion, V newValue)
boolean prepareAndCommit(org.onosproject.store.service.Transaction transaction)
boolean prepare(org.onosproject.store.service.Transaction transaction)
boolean commit(org.onosproject.store.service.Transaction transaction)
boolean rollback(org.onosproject.store.service.Transaction transaction)
Copyright © 2015. All rights reserved.