|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.util.ArchiveManager com.isti.util.ExtendedArchiveManager com.isti.util.FlatDailyArchiveManager
Class FlatDailyArchiveManager is an extension of ArchiveManager that uses a single file for each day, all stored in a single directory. Old archive files are purged (deleted) via the 'purgeArchive()' method, but old items within archive files are not purged (unless the behavior is changed via the 'setPurgeIntoArchiveFlag()' method). 7/21/2003 -- [ET] Changed default date-format time zone to GMT; added 'setDateFormatTimeZone()'. 9/16/2003 -- [ET] Removed 'archiveOutStmSyncObj', instead using 'archiveAccessSyncObj'. 9/17/2003 -- [KF] Extend ExtendedArchiveManager. 9/19/2003 -- [KF] Fix problem with NullPointerException with the 'getArchiveFilesForDateRange' method. 5/18/2004 -- [KF] Create a new date formatter for each instance. 9/24/2007 -- [ET] Added 'getDateForArchiveFileName()' and 'doesNextArchiveFileExist()' methods.
Nested Class Summary |
Nested classes inherited from class com.isti.util.ExtendedArchiveManager |
ExtendedArchiveManager.AbstractWorkerThread, ExtendedArchiveManager.ArchiveItemWorkerThread, ExtendedArchiveManager.PurgeWorkerThread |
Nested classes inherited from class com.isti.util.ArchiveManager |
ArchiveManager.ProcessCallBack |
Field Summary | |
static java.lang.String |
DEF_DATE_FORMAT_STR
Default date-formatter pattern string ("yyyyMMdd"). |
static java.lang.String |
DEF_FNAME_DATE_SEPSTR
Default datecode separator string ("_"). |
Fields inherited from class com.isti.util.ExtendedArchiveManager |
archiveItemQueueVec, archiveItemWTObj, archiveItemWTSyncObj, purgeWTObj, purgeWTSyncObj |
Constructor Summary | |
FlatDailyArchiveManager(java.lang.Class classObj,
java.lang.String baseFileNameStr)
Creates a new FlatDailyArchiveManager. |
|
FlatDailyArchiveManager(java.lang.Class classObj,
java.lang.String archiveRootDirName,
java.lang.String baseFileNameStr)
Creates a new FlatDailyArchiveManager. |
Method Summary | |
protected void |
createDefaultDateFormatter()
Creates the default date formatter. |
protected boolean |
doesNextArchiveFileExist(java.lang.String fNameStr)
Determines if the next file in the archive sequence exists. |
protected java.lang.String |
getArchiveFileNameForDate(java.util.Date dateObj)
Returns the name of the archive file that would contain items with the given date. |
protected java.util.Vector |
getArchiveFilesForDateRange(java.util.Date startDate,
java.util.Date endDate)
Returns all of the archive file names that can potentially contain items with an archive date between startDate and endDate (inclusive). |
protected java.util.Date |
getDateForArchiveFileName(java.lang.String fNameStr)
Parses the given filename for a date code. |
java.text.DateFormat |
getDateFormatObj()
Returns the 'DateFormat' object used to generate date codes inserted into archive file names. |
java.text.DateFormat |
getFileNameDateParserObj()
Returns a 'DateFormat' parser that may be used to parse a date value from an archive file name. |
java.lang.String |
getFNameDateSepStr()
Returns the separator string put in front of date codes inserted into archive file names. |
protected java.io.OutputStream |
getOutputStreamForItem(Archivable item)
Returns an output stream for the file that the item should be archived to, with a name based on the archive date of item. |
void |
setDateFormatObj(java.text.DateFormat dFormatObj)
Sets the 'DateFormat' object used to generate date codes inserted into archive file names. |
void |
setDateFormatTimeZone(java.util.TimeZone timeZoneObj)
Sets the time zone for the 'DateFormat' object used to generate date codes inserted into archive file names. |
void |
setFNameDateSepStr(java.lang.String sepStr)
Sets the separator string put in front of date codes inserted into archive file names. |
Methods inherited from class com.isti.util.ExtendedArchiveManager |
addToWorkerThread, archiveItem, archiveQueuedItem, closeArchive, getArchivePollTime, getArchivePurgeAge, isArchiveItemQueueEnabled, purgeArchive, removeFromWorkerThread, setArchiveItemQueueEnabled, setArchivePollTime, setArchivePurgeAge, signalWorkerThread, terminateWorkerThreads |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEF_DATE_FORMAT_STR
public static final java.lang.String DEF_FNAME_DATE_SEPSTR
Constructor Detail |
public FlatDailyArchiveManager(java.lang.Class classObj, java.lang.String archiveRootDirName, java.lang.String baseFileNameStr) throws java.lang.NoSuchMethodException
classObj
- class object representing the class to be archived.archiveRootDirName
- name of root directory in which to place
archive files (and possibly directories), or null to use the
current working directory.baseFileNameStr
- the "base" file name to used to generate
archive file names. A date code will be inserted before the
extension part of the file name.
java.lang.NoSuchMethodException
- if a proper constructor does not exist
for the class.
java.lang.NullPointerException
- If baseFileNameStr
is null
public FlatDailyArchiveManager(java.lang.Class classObj, java.lang.String baseFileNameStr) throws java.lang.NoSuchMethodException
classObj
- class object representing the class to be archived.baseFileNameStr
- the "base" file name to used to generate
archive file names. A date code will be inserted before the
extension part of the file name.
java.lang.NoSuchMethodException
- if a proper constructor does not exist
for the class.
java.lang.NullPointerException
- If baseFileNameStr
is null
Method Detail |
public void setDateFormatObj(java.text.DateFormat dFormatObj)
dFormatObj
- the 'DateFormat' object to use, or null to
set the default 'DateFormat' object.public java.text.DateFormat getDateFormatObj()
public void setDateFormatTimeZone(java.util.TimeZone timeZoneObj)
timeZoneObj
- the time zone object to use.public void setFNameDateSepStr(java.lang.String sepStr)
sepStr
- the separator string to use, or null to set the
default separator string.public java.lang.String getFNameDateSepStr()
protected void createDefaultDateFormatter()
protected java.lang.String getArchiveFileNameForDate(java.util.Date dateObj)
getArchiveFileNameForDate
in class ArchiveManager
dateObj
- the date object to use.
protected java.io.OutputStream getOutputStreamForItem(Archivable item) throws java.io.IOException
getOutputStreamForItem
in class ArchiveManager
item
- the item to be archived.
java.io.IOException
- if the archive file cannot be opened.protected java.util.Vector getArchiveFilesForDateRange(java.util.Date startDate, java.util.Date endDate)
getArchiveFilesForDateRange
in class ArchiveManager
startDate
- the start of the time range, or null to indicate
the "beginning of time".endDate
- the end of the time range, or null to indicate
the "end of time".
public java.text.DateFormat getFileNameDateParserObj()
protected java.util.Date getDateForArchiveFileName(java.lang.String fNameStr)
fNameStr
- name of archive file.
protected boolean doesNextArchiveFileExist(java.lang.String fNameStr)
doesNextArchiveFileExist
in class ArchiveManager
fNameStr
- name of archive file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |