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