|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CyclicBufferTracker<E>
An interface for tracking cyclic buffers by key.
| Field Summary | |
|---|---|
static int |
DEFAULT_BUFFER_SIZE
|
static int |
DEFAULT_NUMBER_OF_BUFFERS
|
static int |
THRESHOLD
|
| Method Summary | |
|---|---|
void |
clearStaleBuffers(long now)
Clear (and detach) buffers which are stale. |
int |
getBufferSize()
|
int |
getMaxNumberOfBuffers()
|
CyclicBuffer<E> |
getOrCreate(String key,
long timestamp)
Get the cyclic buffer identified by 'key', updating its timestamp in the process. |
void |
removeBuffer(String key)
Remove a cyclic buffer identified by its key. |
void |
setBufferSize(int size)
|
void |
setMaxNumberOfBuffers(int maxNumBuffers)
Set the maximum number of tracked buffers. |
int |
size()
The size of the internal map/list/collection holding the cyclic buffers. |
| Field Detail |
|---|
static final int DEFAULT_BUFFER_SIZE
static final int DEFAULT_NUMBER_OF_BUFFERS
static final int THRESHOLD
| Method Detail |
|---|
int getBufferSize()
void setBufferSize(int size)
int getMaxNumberOfBuffers()
void setMaxNumberOfBuffers(int maxNumBuffers)
maxNumBuffers -
CyclicBuffer<E> getOrCreate(String key,
long timestamp)
key - timestamp -
void removeBuffer(String key)
void clearStaleBuffers(long now)
now - int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||