oldestseqn(0) {
}
+SlotBuffer::~SlotBuffer() {
+ delete array;
+}
+
int SlotBuffer::size() {
if (head >= tail)
return head - tail;
int64_t checkNum = (getNewestSeqNum() + 1);
if (checkNum != s->getSequenceNumber()) {
- // We have a gap so expunge all our slots
oldestseqn = s->getSequenceNumber();
tail = 0;
head = 1;
int32_t index = diff + tail;
if (index < 0) {
- // Really old message so we dont have it anymore
return NULL;
}
}
if (index >= array->length()) {
-
return NULL;
}
+
if (head >= tail && index >= head) {
return NULL;
}