3 import java.nio.ByteBuffer;
5 import java.util.HashSet;
8 * This Entry records the abort sent by a given machine.
9 * @author Ali Younis <ayounis@uci.edu>
14 class Commit extends Entry {
16 private Set<KeyValue> keyValueUpdateSet;
19 public Commit(Slot slot, long _seqnum, long _machineid) {
25 public long getSequenceNumber() {
33 static Entry decode(Slot slot, ByteBuffer bb) {
34 long seqnum=bb.getLong();
35 long machineid=bb.getLong();
36 return new Abort(slot, seqnum, machineid);
39 public void encode(ByteBuffer bb) {
40 bb.put(Entry.TypeAbort);
42 bb.putLong(machineid);
45 public int getSize() {
46 return 2*Long.BYTES+Byte.BYTES;
49 public byte getType() {
50 return Entry.TypeAbort;
53 public Entry getCopy(Slot s) {
54 return new Abort(s, seqnum, machineid);