3 #include "ByteBuffer.h"
5 #include "CommitPart.h"
7 #include "LastMessage.h"
8 #include "RejectedMessage.h"
9 #include "TableStatus.h"
10 #include "TransactionPart.h"
12 * Generic class that wraps all the different types of information
13 * that can be stored in a Slot.
14 * @author Brian Demsky <bdemsky@uci.edu>
18 Entry *Entry_decode(Slot *slot, ByteBuffer *bb) {
19 char type = bb->get();
23 return CommitPart_decode(slot, bb);
26 return Abort_decode(slot, bb);
28 case TypeTransactionPart:
29 return TransactionPart_decode(slot, bb);
32 return NewKey_decode(slot, bb);
35 return LastMessage_decode(slot, bb);
37 case TypeRejectedMessage:
38 return RejectedMessage_decode(slot, bb);
40 return TableStatus_decode(slot, bb);
47 void Entry::setDead() {
50 return; // already dead
55 if (parentslot != NULL) {
56 parentslot->decrementLiveCount();