public class FeedbackStore
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FeedbackStore.Record
Denotes a single record stored in a FeedbackStore.
|
Modifier and Type | Method and Description |
---|---|
void |
append(long id,
byte[] entry)
Store the given record data as the next record.
|
void |
close()
Release all resources.
|
long |
getFileSize()
Return the filesize for this file
|
long |
getFirstEventID()
Get the ID of the first written event record, which is most of the times the first event record.
|
long |
getId()
Get the log id of this store.
|
long |
getLastEventID()
Get the ID of the last written event record, which is most of the times the current event record.
|
java.util.List<FeedbackStore.Record> |
getRecords(long fromId,
long toId) |
void |
truncate()
Try to truncate the store at the current record.
|
public void append(long id, byte[] entry) throws java.io.IOException
entry
- the data of the record to store.java.io.IOException
- in case of any IO error.public void close() throws java.io.IOException
java.io.IOException
- in case of any IO error.public long getFileSize() throws java.io.IOException
java.io.IOException
- in case of any IO error.public long getFirstEventID()
public long getId()
public long getLastEventID()
public java.util.List<FeedbackStore.Record> getRecords(long fromId, long toId) throws java.io.IOException
java.io.IOException
public void truncate() throws java.io.IOException
java.io.IOException
- in case of any IO error.