3 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
5 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7 var Entry = function () {
9 _classCallCheck(this, Entry);
11 if (slot && slot instanceof Slot) {
13 this.TypeKeyValue = 1;
14 this.TypeLastmessage = 2;
15 this.TypeRejectedMessage = 3;
16 this.TypeTableStatus = 4;
17 this.liveStatus = true;
18 this.parentslot = slot;
22 _createClass(Entry, [{
24 value: function isLive() {
25 return this.liveStatus;
29 value: function setDead() {
30 this.liveStatus = false;
31 parentslot.decrementLiveCount();
38 value: function encode(bytebuffer) {}
41 value: function getSize() {}
44 value: function getType() {}
47 value: function getCopy(slot) {
48 if (slot && slot instanceof Slot) {}
52 value: function decode(slot, bytebuffer) {
53 if (slot instanceof Slot && bytebuffer instanceof ByteBuffer) {
54 var type = bytebuffer.readByte();
56 case this.TypeKeyValue:
57 return KeyValue.decode(slot, bytebuffer);
58 case this.TypeLastmessage:
59 return LastMessage.decode(slot, bytebuffer);
60 case this.TypeRejectedMessage:
61 return RejectedMessage.decode(slot, bytebuffer);
62 case this.TypeTableStatus:
63 return TableStatus.decode(slot, bytebuffer);
65 throw new Error("Unrecognized Entry Type: " + type);