3 import java.nio.ByteBuffer;
6 * This Entry records the abort sent by a given machine.
7 * @author Ali Younis <ayounis@uci.edu>
12 class Abort extends Entry {
13 private long seqnumtrans;
14 private long machineid;
16 Abort(Slot slot, long _seqnumtrans, long _machineid) {
18 seqnumtrans=_seqnumtrans;
26 long getTransSequenceNumber() {
30 static Entry decode(Slot slot, ByteBuffer bb) {
31 long seqnumtrans=bb.getLong();
32 long machineid=bb.getLong();
33 return new Abort(slot, seqnumtrans, machineid);
36 void encode(ByteBuffer bb) {
37 bb.put(Entry.TypeAbort);
38 bb.putLong(seqnumtrans);
39 bb.putLong(machineid);
43 return 2*Long.BYTES+Byte.BYTES;
47 return Entry.TypeAbort;
50 Entry getCopy(Slot s) {
51 return new Abort(s, seqnumtrans, machineid);