7 // Max size of the part excluding the fixed size header
8 #define CommitPart_MAX_NON_HEADER_SIZE 512
10 class CommitPart : public Entry {
12 // Sequence number of the transaction this commit is for, -1 if not a cloud transaction
13 int64_t machineId; // Machine Id of the device that made the commit
14 int64_t sequenceNumber; // commit sequence number for this arbitrator
15 int64_t transactionSequenceNumber;
16 int32_t partNumber; // Parts position in the
20 Pair<int64_t, int32_t> *partId;
21 Pair<int64_t, int64_t> *commitId;
24 CommitPart(Slot *s, int64_t _machineId, int64_t _sequenceNumber, int64_t _transactionSequenceNumber, int _partNumber, Array<char> *_data, bool _isLastPart);
26 void setSlot(Slot *s);
29 Array<char> *getData();
30 Pair<int64_t, int32_t> *getPartId();
31 Pair<int64_t, int64_t> *getCommitId();
33 int64_t getMachineId();
34 int64_t getTransactionSequenceNumber();
35 int64_t getSequenceNumber();
36 void encode(ByteBuffer *bb);
38 Entry *getCopy(Slot *s);
41 Entry *CommitPart_decode(Slot *s, ByteBuffer *bb);