1 class RejectedMessage extends Entry {
2 constructor(slot, _machineid, _oldseqnum, _newseqnum, _equalto) {
4 this.machineid = _machineid;
5 this.oldseqnum = _oldseqnum;
6 this.newseqnum = _newseqnum;
7 this.equalto = _equalto;
8 this.watchset = new Set();
11 return this.oldseqnum;
14 return this.newseqnum;
20 return this.machineid;
22 static decode(slot, bb) {
23 this.machineid = bb.readByte();
24 this.oldseqnum = bb.readInt64();
25 this.newseqnum = bb.readInt64();
26 this.equalto = bb.readbyte();
27 return new RejectedMessage(this.slot, this.machineid, this.oldseqnum, this.newseqnum, this.equalto === 1)
29 setWatchSet(_watchset) {
30 this.watchset = _watchset;
32 removeWatcher(_machineid) {
33 if (this.watchset.remove(_machineid)) {
34 if (this.watchset.isEmpty()) {
40 bb.writeByte(Entry.TypeRejectedMessage);
41 bb.writeInt64(this.machineid);
42 bb.writeInt64(this.oldseqnum);
43 bb.writeInt64(this.newseqnum);
44 if (this.equalto === true) {
54 return Entry.TypeRejectedMessage;
57 return new RejectedMessage(s,this.machineid,this.oldseqnum,this.newseqnum,this.equalto);