public interface DatabaseState<K,V>
| Modifier and Type | Method and Description |
|---|---|
CommitResponse |
commit(org.onosproject.store.service.Transaction transaction) |
Long |
counterAddAndGet(String counterName,
long delta) |
Long |
counterGet(String counterName) |
Long |
counterGetAndAdd(String counterName,
long delta) |
Map<String,Long> |
counters() |
void |
init(net.kuujo.copycat.state.StateContext<DatabaseState<K,V>> context)
Initializes the database state.
|
Result<Void> |
mapClear(String mapName) |
boolean |
mapContainsKey(String mapName,
K key) |
boolean |
mapContainsValue(String mapName,
V value) |
Set<Map.Entry<K,org.onosproject.store.service.Versioned<V>>> |
mapEntrySet(String mapName) |
org.onosproject.store.service.Versioned<V> |
mapGet(String mapName,
K key) |
boolean |
mapIsEmpty(String mapName) |
Set<K> |
mapKeySet(String mapName) |
Set<String> |
maps() |
int |
mapSize(String mapName) |
Result<UpdateResult<K,V>> |
mapUpdate(String mapName,
K key,
Match<V> valueMatch,
Match<Long> versionMatch,
V value) |
Collection<org.onosproject.store.service.Versioned<V>> |
mapValues(String mapName) |
boolean |
prepare(org.onosproject.store.service.Transaction transaction) |
CommitResponse |
prepareAndCommit(org.onosproject.store.service.Transaction transaction) |
byte[] |
queuePeek(String queueName) |
byte[] |
queuePop(String queueName) |
void |
queuePush(String queueName,
byte[] entry) |
Long |
queueSize(String queueName) |
boolean |
rollback(org.onosproject.store.service.Transaction transaction) |
void init(net.kuujo.copycat.state.StateContext<DatabaseState<K,V>> context)
context - The map state context.int mapSize(String mapName)
boolean mapIsEmpty(String mapName)
Result<UpdateResult<K,V>> mapUpdate(String mapName, K key, Match<V> valueMatch, Match<Long> versionMatch, V value)
Collection<org.onosproject.store.service.Versioned<V>> mapValues(String mapName)
Set<Map.Entry<K,org.onosproject.store.service.Versioned<V>>> mapEntrySet(String mapName)
byte[] queuePeek(String queueName)
byte[] queuePop(String queueName)
void queuePush(String queueName, byte[] entry)
CommitResponse prepareAndCommit(org.onosproject.store.service.Transaction transaction)
boolean prepare(org.onosproject.store.service.Transaction transaction)
CommitResponse commit(org.onosproject.store.service.Transaction transaction)
boolean rollback(org.onosproject.store.service.Transaction transaction)
Copyright © 2015. All rights reserved.