Modifier and Type | Field and Description |
---|---|
static String |
FILE_SUFFIX
File suffix added to all serialized event files.
|
Constructor and Description |
---|
DiskBuffer(File bufferDir,
int maxEvents)
Construct an DiskBuffer which stores errors in the specified directory on disk.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Event event)
Store a single event to the add directory.
|
void |
discard(Event event)
Deletes a buffered
Event from disk. |
Iterator<Event> |
getEvents()
Returns an Iterator of Events that are stored on disk at the point in time this method
is called.
|
public static final String FILE_SUFFIX
public DiskBuffer(File bufferDir, int maxEvents)
bufferDir
- File representing directory to store buffered Events inmaxEvents
- The maximum number of events to store offlinepublic void add(Event event)
public Iterator<Event> getEvents()
Event
s.
If Events are written to disk after this Iterator is created they will not be returned
by this Iterator.Copyright © 2012–2017. All rights reserved.