public class MapTransactionLogRecord extends Object implements TransactionLogRecord
| Constructor and Description |
|---|
MapTransactionLogRecord() |
MapTransactionLogRecord(String name,
Data key,
int partitionId,
Operation op,
String ownerUuid,
NearCachingHook nearCachingHook) |
| Modifier and Type | Method and Description |
|---|---|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
Object |
getKey()
Gets the transaction-log-key that uniquely identifies the
TransactionLogRecord within the TransactionLog. |
Operation |
newCommitOperation() |
Operation |
newPrepareOperation() |
Operation |
newRollbackOperation() |
void |
onCommitFailure() |
void |
onCommitSuccess() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public MapTransactionLogRecord()
public MapTransactionLogRecord(String name, Data key, int partitionId, Operation op, String ownerUuid, NearCachingHook nearCachingHook)
public Operation newPrepareOperation()
newPrepareOperation in interface TransactionLogRecordpublic Operation newCommitOperation()
newCommitOperation in interface TransactionLogRecordpublic void onCommitSuccess()
onCommitSuccess in interface TransactionLogRecordpublic void onCommitFailure()
onCommitFailure in interface TransactionLogRecordpublic Operation newRollbackOperation()
newRollbackOperation in interface TransactionLogRecordpublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.public Object getKey()
TransactionLogRecordTransactionLogRecord within the TransactionLog.
E.g. for a map that would be the map-name and the key. So if a map transactional put is done on some
key, and if later on another put on that key is done, by using the same transaction-log-key, the first
put is overwritten.
If null is returned, this TransactionLogRecord can't be identified and can't be overwritten by a later change.getKey in interface TransactionLogRecordpublic int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializableCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.