--- /dev/null
+class LastMessage extends Entry{
+ constructor(slot,_machineid,_seqnum){
+ super(slot);
+ this.machineid = _machineid;
+ this.seqnum = _seqnum;
+ }
+ getMachineID(){
+ return this.machineid;
+ }
+ getSequenceNumber() {
+ return this.seqnum;
+ }
+ decode(slot,bb){
+ //slot and bb are instancesof Slot and ByteBuffer
+ if(!(slot instanceof Slot && bb instanceof ByteBuffer)){
+ throw new Error('Problem with the Arguments');
+ }
+ var machineid = bb.readInt64();
+ var seqnum = bb.readInt64();
+ return new LastMessage(slot,machineid,seqnum);
+ }
+ encode(bb){
+ bb.writeByte(Entry.TypeLastMessage);
+ bb.writeInt64(this.machineid);
+ bb.writeInt64(this.seqnum);
+ }
+ getSize(){
+ return 2*(1+1);
+ }
+ getType(){
+ return Entry.TypeLastMessage;
+ }
+ getCopy(s){
+ if(!(s instanceof Slot)){
+ throw new Error('Argument must be a slot object');
+ }
+ return new LastMessage(s,this.machineid,this.seqnum);
+ }
+}
\ No newline at end of file