more updates
[iotcloud.git] / src / java / iotcloud / SlotBuffer.java
index 8a8662b85f42d67b810046e4d5ad0f0569c5462d..e3ababf7666a3e3d29b315f1bb5e6ba27844d1f2 100644 (file)
@@ -10,6 +10,8 @@ class SlotBuffer {
 
        SlotBuffer() {
                array=new Slot[DEFAULT_SIZE+1];
+               head=tail=0;
+               oldestseqn=0;
        }
 
        int size() {
@@ -18,6 +20,10 @@ class SlotBuffer {
                return (array.length + head) - tail;
        }
 
+       int capacity() {
+               return array.length - 1;
+       }
+       
        void resize(int newsize) {
                if (newsize == (array.length-1))
                        return;