public interface EventsStorage
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte[] data)
Add an event represented as a byte array to the working file
|
boolean |
canWorkingFileStore(int newEventSizeInBytes,
int maxByteSizePerFile) |
void |
deleteFilesInRollOverDirectory(List<File> files)
Clear out given set of files in roll-over directory
|
void |
deleteWorkingFile()
Clear out active working file
|
List<File> |
getAllFilesInRollOverDirectory() |
List<File> |
getBatchOfFilesToSend(int maxBatchSize) |
File |
getRollOverDirectory() |
File |
getWorkingDirectory() |
int |
getWorkingFileUsedSizeInBytes() |
boolean |
isWorkingFileEmpty() |
void |
rollOver(String targetName)
roll the current working file over to a file in the roll-over directory
with the given name.
|
void add(byte[] data) throws IOException
IOExceptionint getWorkingFileUsedSizeInBytes()
boolean isWorkingFileEmpty()
void rollOver(String targetName)
throws IOException
IOExceptionFile getWorkingDirectory()
File getRollOverDirectory()
List<File> getBatchOfFilesToSend(int maxBatchSize)
maxBatchSize - maximum number of files to include in batchList<File> getAllFilesInRollOverDirectory()
void deleteFilesInRollOverDirectory(List<File> files)
void deleteWorkingFile()
boolean canWorkingFileStore(int newEventSizeInBytes,
int maxByteSizePerFile)
newEventSizeInBytes - the size in bytes of the event we would like to write to the working filemaxByteSizePerFile - The size in bytes which we will enforce as the maximum for the working filetrue if the new event size will fit in the working file, false if not