Package com.nt.udc.osanode
Class OSARFileMngr
java.lang.Object
com.nt.udc.osanode.OSARFileMngr
- All Implemented Interfaces:
ActionListener
,EventListener
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
This method deletes the OSAR file in the node's input directory from which the latest batch of OSARs has been processed.final FilenameGenerator
boolean
OSAR[]
This method reads all OSARs from the oldest archive file in the node's input directory and returns an OSAR array to the caller.OSAR[]
readOSARsFromFile
(File osarFile) final void
setFilenameGenerator
(FilenameGenerator filenameGen) void
shutdown()
boolean
The writeOSAR() method stores an OSAR in the current cache file.boolean
writeOSARs
(OSAR[] osars) This method writes OSARs to the node's output directory.
-
Field Details
-
FILEMGRINIT
-
OSARREAD
-
OSARWRITE
-
OSARDELETE
-
-
Constructor Details
-
OSARFileMngr
-
-
Method Details
-
shutdown
public void shutdown() -
getFilenameGenerator
-
setFilenameGenerator
-
readOSARsFromFile
-
readOSARs
This method reads all OSARs from the oldest archive file in the node's input directory and returns an OSAR array to the caller. Current functionality allows only for a bulk read of OSARs from archive files in the input directory. Much more file management must be added to allow the reading of single OSARs from the input directory. -
deleteOSARs
public boolean deleteOSARs()This method deletes the OSAR file in the node's input directory from which the latest batch of OSARs has been processed. -
writeOSARs
This method writes OSARs to the node's output directory. -
writeOSAR
The writeOSAR() method stores an OSAR in the current cache file. When the cache file reaches the maximum number of OSARs, it is renamed to the node output directory, which makes it available to the LDM and RDM. -
moveToArchive
public boolean moveToArchive() -
checkInput
public boolean checkInput() -
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-