Public Member Functions | |
File | getNewFile () throws IOException |
void | fileProcessed (File filePointer, String minTime, String maxTime) |
long | getMaxFileSize () |
Static Public Attributes | |
static final long | DEFAULT_SIZE = 1073741824 |
static final String | MAXSIZE_PROPERTY_NAME = "jlog.enine.cache.maxFilesSize" |
An interface to create and delete cache files.
CacheFile uses an implementation of this class whenever it needs to create a new file or when all the logs in the file have been processed and the file can be deleted.
The purpose of this interface is to customize ACS and ARCHIVE needs while getting logs from the NC in order to improve performances avoiding file duplication.
For further information, read COMP-3982.
void com.cosylab.logging.engine.cache.ILogQueueFileHandler.fileProcessed | ( | File | filePointer, | |
String | minTime, | |||
String | maxTime | |||
) |
Notify that all the logs in the passed file have been processed by the engine and the file can be deleted.
The dates are represented as strings in ISO format.
filePointer | The file to be released | |
minTime | The min timestamp of the logs in cache (null if the file is empty) | |
maxTime | The max timestamp of the logs in cache (null if the file is empty) |
Implemented in com.cosylab.logging.engine.cache.LogQueueFileHandlerImpl.
long com.cosylab.logging.engine.cache.ILogQueueFileHandler.getMaxFileSize | ( | ) |
Return the maximum size of each file of the cache.
The returned size, in bytes, must be greater then 1024. A default implementation of this method can be seen in LogQueueFileHandlerImpl.
Implemented in com.cosylab.logging.engine.cache.LogQueueFileHandlerImpl.
Referenced by com.cosylab.logging.engine.cache.EngineCache.push().
File com.cosylab.logging.engine.cache.ILogQueueFileHandler.getNewFile | ( | ) | throws IOException |
Create and return a new file for reading and writing.
The created file will be used to store strings and accessed randomly by the engine.
IOException | In case of error creating the file |
Implemented in com.cosylab.logging.engine.cache.LogQueueFileHandlerImpl.
final long com.cosylab.logging.engine.cache.ILogQueueFileHandler.DEFAULT_SIZE = 1073741824 [static] |
The default max size for each file of the cache. The default value is used when the java property is not found and the size is not given explicitly.
NFS could be limited to 2GB depending on the installed version
Referenced by com.cosylab.logging.engine.cache.LogQueueFileHandlerImpl.LogQueueFileHandlerImpl().
final String com.cosylab.logging.engine.cache.ILogQueueFileHandler.MAXSIZE_PROPERTY_NAME = "jlog.enine.cache.maxFilesSize" [static] |
The name of the property with the size of the file
Referenced by com.cosylab.logging.engine.cache.LogQueueFileHandlerImpl.LogQueueFileHandlerImpl().