public class TransactionLog extends Object
TransactionLogRecord
for a given transaction.
If within a transaction 3 map.puts would be done on different
keys and 1 queue.take would be done, than the TransactionLog
will contains 4 TransactionLogRecord
instances.
Planned optimization:
Most transaction will be small, but an HashMap is created.
Instead use an array and do a linear search in that array.
When there are too many items added, then enable the hashmap.Constructor and Description |
---|
TransactionLog() |
TransactionLog(Collection<TransactionLogRecord> transactionLog) |
Modifier and Type | Method and Description |
---|---|
void |
add(TransactionLogRecord record) |
List<Future> |
commit(NodeEngine nodeEngine) |
void |
commitAsync(NodeEngine nodeEngine,
BiConsumer callback) |
TransactionLogRecord |
get(Object key) |
Collection<TransactionLogRecord> |
getRecords() |
List<Future> |
prepare(NodeEngine nodeEngine) |
void |
remove(Object key) |
List<Future> |
rollback(NodeEngine nodeEngine) |
void |
rollbackAsync(NodeEngine nodeEngine,
BiConsumer callback) |
int |
size()
Returns the number of TransactionRecords in this TransactionLog.
|
public TransactionLog()
public TransactionLog(Collection<TransactionLogRecord> transactionLog)
public void add(TransactionLogRecord record)
public TransactionLogRecord get(Object key)
public Collection<TransactionLogRecord> getRecords()
public void remove(Object key)
public int size()
public List<Future> commit(NodeEngine nodeEngine)
public List<Future> prepare(NodeEngine nodeEngine)
public List<Future> rollback(NodeEngine nodeEngine)
public void commitAsync(NodeEngine nodeEngine, BiConsumer callback)
public void rollbackAsync(NodeEngine nodeEngine, BiConsumer callback)
Copyright © 2019 Hazelcast, Inc.. All rights reserved.