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,
ExecutionCallback callback) |
TransactionLogRecord |
get(Object key) |
Collection<TransactionLogRecord> |
getRecords() |
void |
onCommitFailure() |
void |
onCommitSuccess() |
List<Future> |
prepare(NodeEngine nodeEngine) |
void |
remove(Object key) |
List<Future> |
rollback(NodeEngine nodeEngine) |
void |
rollbackAsync(NodeEngine nodeEngine,
ExecutionCallback 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 void onCommitSuccess()
public void onCommitFailure()
public List<Future> prepare(NodeEngine nodeEngine)
public List<Future> rollback(NodeEngine nodeEngine)
public void commitAsync(NodeEngine nodeEngine, ExecutionCallback callback)
public void rollbackAsync(NodeEngine nodeEngine, ExecutionCallback callback)
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.