4 * This Entry records the abort sent by a given machine.
5 * @author Ali Younis <ayounis@uci.edu>
10 class NewKey extends Entry {
14 NewKey(Slot slot, IoTString _key, int64_t _machineid) {
17 machineid = _machineid;
20 int64_t getMachineID() {
28 void setSlot(Slot s) {
32 static Entry decode(Slot slot, ByteBuffer bb) {
33 int keylength = bb.getInt();
34 char[] key = new char[keylength];
36 int64_t machineid = bb.getLong();
38 return new NewKey(slot, IoTString.shallow(key), machineid);
41 void encode(ByteBuffer bb) {
42 bb.put(Entry.TypeNewKey);
43 bb.putInt(key.length());
44 bb.put(key.internalBytes());
45 bb.putLong(machineid);
49 return sizeof(int64_t) + sizeof(char) + sizeof(int32_t) + key.length();
53 return Entry.TypeNewKey;
56 Entry getCopy(Slot s) {
57 return new NewKey(s, key, machineid);