public class MockTSOClient extends Object implements TSOProtocol
| Constructor and Description |
|---|
MockTSOClient(CommitTable.Writer commitTable) |
| Modifier and Type | Method and Description |
|---|---|
TSOFuture<Void> |
close()
Closes the communication with the TSO server
|
TSOFuture<Long> |
commit(long transactionId,
Set<? extends CellId> cells)
Returns the result of the conflict detection made on the server-side for the specified transaction
|
TSOFuture<Long> |
commit(long transactionId,
Set<? extends CellId> cells,
Set<? extends CellId> conflictFreeWriteSet)
Returns the result of the conflict detection made on the server-side for the specified transaction
|
OmidClientConfiguration.ConflictDetectionLevel |
getConflictDetectionLevel() |
long |
getEpoch()
Returns the epoch of the current TSO server.
|
TSOFuture<Long> |
getFence(long tableId)
Returns a new fence timestamp assigned by on the server-side
|
TSOFuture<Long> |
getNewStartTimestamp()
Returns a new timestamp assigned by on the server-side
|
boolean |
isLowLatency()
checks if tso is low latency protocol
|
void |
setConflictDetectionLevel(OmidClientConfiguration.ConflictDetectionLevel conflictDetectionLevel) |
public MockTSOClient(CommitTable.Writer commitTable)
public TSOFuture<Long> getNewStartTimestamp()
TSOProtocolgetNewStartTimestamp in interface TSOProtocolpublic TSOFuture<Long> getFence(long tableId)
TSOProtocolgetFence in interface TSOProtocoltableId - the table to create fence for.public TSOFuture<Long> commit(long transactionId, Set<? extends CellId> cells, Set<? extends CellId> conflictFreeWriteSet)
TSOProtocolcommit in interface TSOProtocoltransactionId - the transaction to check for conflictscells - the writeSet of the transaction, which includes all the modified cellsconflictFreeWriteSet - the conflict free writeSet of the transaction, needed only for table access information.public TSOFuture<Long> commit(long transactionId, Set<? extends CellId> cells)
TSOProtocolcommit in interface TSOProtocoltransactionId - the transaction to check for conflictscells - the writeSet of the transaction, which includes all the modified cellspublic TSOFuture<Void> close()
TSOProtocolclose in interface TSOProtocolpublic boolean isLowLatency()
TSOProtocolisLowLatency in interface TSOProtocolpublic void setConflictDetectionLevel(OmidClientConfiguration.ConflictDetectionLevel conflictDetectionLevel)
setConflictDetectionLevel in interface TSOProtocolpublic OmidClientConfiguration.ConflictDetectionLevel getConflictDetectionLevel()
getConflictDetectionLevel in interface TSOProtocolpublic long getEpoch()
TSOProtocolgetEpoch in interface TSOProtocolCopyright © 2011–2020 Apache Software Foundation. All rights reserved.