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