public class QueueFileHandler extends TimestampedStringQueueFileHandler
TimestampedStringQueueFileHandler to rename the file once it has been
processed.
The final name initially agreed in ICT-4314, has been redefined in ICT-5523
to show the creation and closing timestamps of the file instead of
oldest and newer timestamps in the string.DEFAULT_PREFIX, DEFAULT_SIZE, maxFilesSize, MAXSIZE_PROPERTY_NAME, prefix| Constructor and Description |
|---|
QueueFileHandler(ContainerServices cs,
java.lang.String folder,
int myFileMax,
long myMaxFileSize,
java.lang.String fileNamePrefix,
java.lang.String faultFamily)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
fileProcessed(java.io.File oldFile,
java.lang.String earliestTimestamp,
java.lang.String lastTimestamp)
In ICT-5523, it has been decided that the file name must be that of the creation and closing of the file.
|
java.io.File |
getNewFile()
Create and return a new file for reading and writing.
|
getMaxFileSize, getPrefixpublic QueueFileHandler(ContainerServices cs, java.lang.String folder, int myFileMax, long myMaxFileSize, java.lang.String fileNamePrefix, java.lang.String faultFamily) throws java.lang.Exception
myLogger - The loggerfolder - The folder to save XMLsmyFileMax - Max number of XML files to keep in the foldermyMaxFileSize - Max length of each XML filefileNamePrefix - The prefix to each name of XML filefaultFamily - The FF to send alarmsjava.lang.Exceptionpublic java.io.File getNewFile()
throws java.io.IOException
TimestampedStringQueueFileHandlerThe created file will be used to store strings and accessed randomly by the engine. Note: implementors of this method should ensure tha the file is deleted for example setting deleteOnExit().
getNewFile in class TimestampedStringQueueFileHandlerjava.io.IOException - In case of error creating the fileTimestampedStringQueueFileHandlerr#getNewFile()public void fileProcessed(java.io.File oldFile,
java.lang.String earliestTimestamp,
java.lang.String lastTimestamp)
fileProcessed in class TimestampedStringQueueFileHandleroldFile - The file to be releasedearliestTimestamp - The min timestamp of the strings in cache
(null if the file is empty)lastTimestamp - The max timestamp of the strings in cache
(null if the file is empty)TimestampedStringQueueFileHandlerr#fileProcessed(java.io.File,java.lang.String, java.lang.String)