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();
22 return CommitPart_decode(slot, bb);
24 return Abort_decode(slot, bb);
25 case TypeTransactionPart:
26 return TransactionPart_decode(slot, bb);
28 return NewKey_decode(slot, bb);
30 return LastMessage_decode(slot, bb);
31 case TypeRejectedMessage:
32 return RejectedMessage_decode(slot, bb);
34 return TableStatus_decode(slot, bb);
41 void Entry::setDead() {
44 if (parentslot != NULL) {
45 parentslot->decrementLiveCount();