public class DefaultXmlQueueFileHandlerImpl extends DefaultQueueFileHandlerImpl
DefaultQueueFileHandlerImpl to be used to store
XML strings in the file of the queue by appending the XML header and footer at the beginning and at the
end of each file of the cache.
The constructor allow the set the TAG of the items contained in the files.
DefaultQueueFileHandlerImpl but for the getNewFile()
and fileProcessed(java.io.File, String, String).
The former writes the XML header at the beginning of the file before
returning the fiole to the caller. The latter append the XML footer at the end of the file.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
standardXmlHdr
Standard XML header
|
static java.lang.String |
xmlHeader
The header for XML
|
DEFAULT_PREFIX, DEFAULT_SIZE, maxFilesSize, MAXSIZE_PROPERTY_NAME, prefix| Constructor and Description |
|---|
DefaultXmlQueueFileHandlerImpl(long maxFileSize,
java.lang.String xmlTag) |
DefaultXmlQueueFileHandlerImpl(long maxFileSize,
java.lang.String prefix,
java.lang.String xmlTag) |
DefaultXmlQueueFileHandlerImpl(java.lang.String xmlTag)
The XML tag for the items contained in the XML.
|
DefaultXmlQueueFileHandlerImpl(java.lang.String prefix,
java.lang.String xmlTag) |
| Modifier and Type | Method and Description |
|---|---|
void |
fileProcessed(java.io.File filePointer,
java.lang.String minTime,
java.lang.String maxTime)
Append the XML footer to the passed file before calling
DefaultQueueFileHandlerImpl.fileProcessed(File, String, String) |
java.io.File |
getNewFile()
Get the file from
DefaultQueueFileHandlerImpl.getNewFile() and write the XML header
at the beginning of the file before returning to the caller. |
getMaxFileSize, getPrefixpublic static final java.lang.String standardXmlHdr
public static final java.lang.String xmlHeader
public DefaultXmlQueueFileHandlerImpl(java.lang.String xmlTag)
xmlTag - The tag of the items in each XML file of the queueDefaultQueueFileHandlerImplpublic DefaultXmlQueueFileHandlerImpl(long maxFileSize,
java.lang.String prefix,
java.lang.String xmlTag)
maxFileSize - The max size of the files of the cache.prefix - The prefix of the name of the cache filesxmlTag - The tag of the items in each XML file of the queueDefaultQueueFileHandlerImplpublic DefaultXmlQueueFileHandlerImpl(long maxFileSize,
java.lang.String xmlTag)
maxFileSize - The max size of the files of the cache.xmlTag - The tag of the items in each XML file of the queueDefaultQueueFileHandlerImplpublic DefaultXmlQueueFileHandlerImpl(java.lang.String prefix,
java.lang.String xmlTag)
prefix - The prefix of the name of the cache filesxmlTag - The tag of the items in each XML file of the queueDefaultQueueFileHandlerImplpublic void fileProcessed(java.io.File filePointer,
java.lang.String minTime,
java.lang.String maxTime)
DefaultQueueFileHandlerImpl.fileProcessed(File, String, String)fileProcessed in class DefaultQueueFileHandlerImplfilePointer - The file to be releasedminTime - The min timestamp of the strings in cache
(null if the file is empty)maxTime - The max timestamp of the strings in cache
(null if the file is empty)alma.acs.util.stringqueue.IStringQueueFileHandler#fileProcessed(java.io.File, java.lang.String, java.lang.String)public java.io.File getNewFile()
throws java.io.IOException
DefaultQueueFileHandlerImpl.getNewFile() and write the XML header
at the beginning of the file before returning to the caller.getNewFile in class DefaultQueueFileHandlerImpljava.io.IOException - In case of error creating the fileDefaultQueueFileHandlerImpl#getNewFile()}