4 * Generic class that wraps all the different types of information
5 * that can be stored in a Slot.
6 * @author Brian Demsky <bdemsky@uci.edu>
12 #define TypeCommitPart 1
14 #define TypeTransactionPart 3
16 #define TypeLastMessage 5
17 #define TypeRejectedMessage 6
18 #define TypeTableStatus 7
20 class Entry : public Liveness {
21 /* Records whether the information is still live or has been
22 superceded by a newer update. */
30 Entry(Slot * _parentslot) : islive(true), parentslot(_parentslot) {}
33 * Returns true if the Entry object is still live.
35 bool isLive() { return islive; }
38 * Flags the entry object as dead. Also decrements the live count
44 * Serializes the Entry object into the char buffer.
46 void encode(ByteBuffer bb) = 0;
50 * Returns the size in chars the entry object will take in the char
57 * Returns a char encoding the type of the entry object.
63 * Returns a copy of the Entry that can be added to a different slot.
65 Entry * getCopy(Slot * s) = 0;
69 * Static method for decoding char array into Entry objects. First
70 * char tells the type of entry.
72 Entry * Entry_decode(Slot * slot, ByteBuffer * bb);