projects
/
iotcloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tabbing
[iotcloud.git]
/
version2
/
src
/
C
/
SlotBuffer.h
diff --git
a/version2/src/C/SlotBuffer.h
b/version2/src/C/SlotBuffer.h
index ecd2b970255fcb6221957a9e19aaf92a2d0e8973..7027de67a66616ff08dc52e222619b19450d5dba 100644
(file)
--- a/
version2/src/C/SlotBuffer.h
+++ b/
version2/src/C/SlotBuffer.h
@@
-1,7
+1,7
@@
#ifndef SLOTBUFFER_H
#define SLOTBUFFER_H
#ifndef SLOTBUFFER_H
#define SLOTBUFFER_H
-#include"common.h"
+#include
"common.h"
/**
* Circular buffer that holds the live set of slots.
/**
* Circular buffer that holds the live set of slots.
@@
-12,14
+12,14
@@
#define SlotBuffer_DEFAULT_SIZE 16
class SlotBuffer {
#define SlotBuffer_DEFAULT_SIZE 16
class SlotBuffer {
-
private:
- Array<Slot *> *
array;
+private:
+ Array<Slot *> *array;
int32_t head;
int32_t tail;
void incrementHead();
void incrementTail();
int32_t head;
int32_t tail;
void incrementHead();
void incrementTail();
-
-
public:
+
+public:
int64_t oldestseqn;
SlotBuffer();
int64_t oldestseqn;
SlotBuffer();
@@
-27,7
+27,7
@@
class SlotBuffer {
int32_t capacity();
void resize(int newsize);
void putSlot(Slot *s);
int32_t capacity();
void resize(int newsize);
void putSlot(Slot *s);
- Slot *
getSlot(int64_t seqnum);
+ Slot *getSlot(int64_t seqnum);
int64_t getOldestSeqNum() { return oldestseqn; }
int64_t getNewestSeqNum() { return oldestseqn + size() - 1;}
};
int64_t getOldestSeqNum() { return oldestseqn; }
int64_t getNewestSeqNum() { return oldestseqn + size() - 1;}
};