transactionMachineId(_transactionMachineId),
transactionArbitrator(_transactionArbitrator),
arbitratorLocalSequenceNumber(_arbitratorLocalSequenceNumber),
- abortId(new Pair<uint64_t, uint64_t>(transactionMachineId, transactionClientLocalSequenceNumber)) {
+ abortId(new Pair<int64_t, int64_t>(transactionMachineId, transactionClientLocalSequenceNumber)) {
}
Abort::Abort(Slot * slot, int64_t _transactionClientLocalSequenceNumber, int64_t _transactionSequenceNumber, int64_t _sequenceNumber , int64_t _transactionMachineId, int64_t _transactionArbitrator, int64_t _arbitratorLocalSequenceNumber) :
transactionMachineId(_transactionMachineId),
transactionArbitrator(_transactionArbitrator),
arbitratorLocalSequenceNumber(_arbitratorLocalSequenceNumber),
- abortId(new Pair<uint64_t, uint64_t>(transactionMachineId, transactionClientLocalSequenceNumber)) {
+ abortId(new Pair<int64_t, int64_t>(transactionMachineId, transactionClientLocalSequenceNumber)) {
}
Entry * Abortdecode(Slot * slot, ByteBuffer * bb) {
}
void Abort::encode(ByteBuffer * bb) {
- bb->put(Entry.TypeAbort);
+ bb->put(TypeAbort);
bb->putLong(transactionClientLocalSequenceNumber);
bb->putLong(transactionSequenceNumber);
bb->putLong(sequenceNumber);
void setSequenceNumber(int64_t _sequenceNumber) { sequenceNumber = _sequenceNumber; }
int64_t getTransactionArbitrator() { return transactionArbitrator; }
- void encode(ByteBuffer bb);
+ void encode(ByteBuffer * bb);
int getSize() { return (6 * sizeof(uint64_t)) + sizeof(char); }
char getType() { return TypeAbort; }
Entry * getCopy(Slot * s) { return new Abort(s, transactionClientLocalSequenceNumber, transactionSequenceNumber, sequenceNumber, transactionMachineId, transactionArbitrator, arbitratorLocalSequenceNumber); }
/**
* Serializes the Entry object into the char buffer.
*/
- void encode(ByteBuffer bb) = 0;
+ virtual void encode(ByteBuffer * bb) = 0;
/**
* Returns the size in chars the entry object will take in the char
* array.
*/
- int getSize() = 0;
+ virtual int getSize() = 0;
/**
* Returns a char encoding the type of the entry object.
*/
- char getType() = 0;
+ virtual char getType() = 0;
/**
* Returns a copy of the Entry that can be added to a different slot.
*/
- Entry * getCopy(Slot * s) = 0;
+ virtual Entry * getCopy(Slot * s) = 0;
};
/**