1 class LastMessage extends Entry{
2 constructor(slot,_machineid,_seqnum){
4 this.machineid = _machineid;
14 //slot and bb are instancesof Slot and ByteBuffer
15 if(!(slot instanceof Slot && bb instanceof ByteBuffer)){
16 throw new Error('Problem with the Arguments');
18 var machineid = bb.readInt64();
19 var seqnum = bb.readInt64();
20 return new LastMessage(slot,machineid,seqnum);
23 bb.writeByte(Entry.TypeLastMessage);
24 bb.writeInt64(this.machineid);
25 bb.writeInt64(this.seqnum);
31 return Entry.TypeLastMessage;
34 if(!(s instanceof Slot)){
35 throw new Error('Argument must be a slot object');
37 return new LastMessage(s,this.machineid,this.seqnum);