public class WriteAfterWriteTransactionalContext extends OptimisticTransactionalContext
A write-after-write transactional context behaves like an optimistic context, except behavior during commit (for writes):
(1) Reads behave the same as in a regular optimistic transaction.
(2) Writes in a write-after-write transaction are guaranteed to commit atomically, if and only if none of the objects written (the "write set") were modified between the first read ("first read timestamp") and the time of commit.
Created by mwei on 11/21/16.
ABORTED_ADDRESS, commitAddress, completionFuture, FOLDED_ADDRESS, NOWRITE_ADDRESS, startTime, transaction, transactionID, UNCOMMITTED_ADDRESS
Modifier and Type | Method and Description |
---|---|
void |
addToReadSet(ICorfuSMRProxyInternal proxy,
Object[] conflictObjects)
Add the proxy and conflict-params information to our read set.
|
long |
commitTransaction()
Commit the transaction.
|
access, addTransaction, getConflictSetAndCommit, getUpcallResult, logUpdate, tryCommitAllProxies, updateAllProxies
abortTransaction, compareTo, syncWithRetryUnsafe, toString
public long commitTransaction() throws TransactionAbortedException
OptimisticTransactionalContext
commitTransaction
in class OptimisticTransactionalContext
TransactionAbortedException
- If the transaction was aborted.public void addToReadSet(ICorfuSMRProxyInternal proxy, Object[] conflictObjects)
AbstractTransactionalContext
addToReadSet
in class AbstractTransactionalContext
proxy
- The proxy to addconflictObjects
- The fine-grained conflict information, if
available.Copyright © 2019 CorfuDB. All rights reserved.