edits
[iotcloud.git] / version2 / src / C / NewKey.h
1 #ifndef NEWKEY_H
2 #define NEWKEY_H
3 #include "common.h"
4 #include "Entry.h"
5
6 /**
7  * This Entry records the abort sent by a given machine.
8  * @author Ali Younis <ayounis@uci.edu>
9  * @version 1.0
10  */
11
12 class NewKey : public Entry {
13 private:
14         IoTString *key;
15         int64_t machineid;
16
17 public:
18         NewKey(Slot *slot, IoTString *_key, int64_t _machineid);
19         ~NewKey();
20         int64_t getMachineID() { return machineid; }
21         IoTString *getKey() { return key; }
22         void setSlot(Slot *s) { parentslot = s; }
23         void encode(ByteBuffer *bb);
24         int getSize();
25         char getType() { return TypeNewKey; }
26         Entry *getCopy(Slot *s);
27 };
28
29 Entry *NewKey_decode(Slot *slot, ByteBuffer *bb);
30 #endif