public interface CyclicBufferTracker<E>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BUFFER_SIZE |
static int |
DEFAULT_NUMBER_OF_BUFFERS |
static int |
THRESHOLD |
Modifier and Type | Method and Description |
---|---|
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.
|
static final int DEFAULT_BUFFER_SIZE
static final int DEFAULT_NUMBER_OF_BUFFERS
static final int THRESHOLD
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()
Copyright © 2005-2013 QOS.ch. All Rights Reserved.