--- /dev/null
+class Entry{
+ constructor(slot) {
+ if (slot && slot instanceof Slot) {
+
+ this.TypeKeyValue = 1;
+ this.TypeLastmessage = 2;
+ this.TypeRejectedMessage = 3;
+ this.TypeTableStatus = 4;
+ this.liveStatus = true;
+ this.parentslot = slot;
+
+ }
+ }
+ static decode(slot, bytebuffer) {
+ if (slot instanceof Slot && bytebuffer instanceof ByteBuffer) {
+ var type = bytebuffer.readByte();
+ switch (type) {
+ case this.TypeKeyValue:
+ return KeyValue.decode(slot, bytebuffer);
+ case this.TypeLastmessage:
+ return LastMessage.decode(slot, bytebuffer);
+ case this.TypeRejectedMessage:
+ return RejectedMessage.decode(slot, bytebuffer);
+ case this.TypeTableStatus:
+ return TableStatus.decode(slot, bytebuffer);
+ default:
+ throw new Error("Unrecognized Entry Type: " + type);
+ }
+ }
+ }
+ isLive(){
+ return this.liveStatus;
+ }
+ setDead() {
+ this.liveStatus = false;
+ parentslot.decrementLiveCount();
+ }
+
+ encode(bytebuffer){
+
+ }
+ getSize(){
+
+ }
+ getType(){
+
+ }
+ getCopy(slot){
+ if(slot && slot instanceof Slot){
+
+ }
+ }
+}
\ No newline at end of file