Package com.nt.udc.ndk.util
Class FileRetentionThread
java.lang.Object
java.lang.Thread
com.nt.udc.ndk.util.FileRetentionThread
- All Implemented Interfaces:
Runnable
FileRetetentionThread is responsible for moving/deleting older files
from DC output directory to archive directory after retention period.
This thread will be used only if File Retention is enabled in Node GUI.
This thread starts running when node starts and ends when node ends.
This thread checks at every hour starting for the older files in the
output folder. If files found, it moves/deletes them based on the file
retention action configured in the Node GUI.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionFileRetentionThread
(int retentionDays, String fileRetentionAction, String archiveFolder, String fileExtension, String dcOutputFolder, LoggerIfc logger) The constructor used initialize the parameters required for File Retention thread.FileRetentionThread
(int retentionDays, String fileRetentionAction, String archiveFolder, String fileExtension, String dcOutputFolder, LoggerIfc logger, String prefix) constructor with prefix parameter. -
Method Summary
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Constructor Details
-
FileRetentionThread
public FileRetentionThread(int retentionDays, String fileRetentionAction, String archiveFolder, String fileExtension, String dcOutputFolder, LoggerIfc logger, String prefix) throws NodeStartException constructor with prefix parameter.- Parameters:
retentionDays
- number of days the files to retain in the output folderfileRetentionAction
- what to do on the older files after retention daysarchiveFolder
- the folder to which the files will be moved if archive action is selectedfileExtension
- the file extension used filtering completed files.dcOutputFolder
- the folder from which the files need to be moved/deletedlogger
- exception will be logged in this loggerprefix
- the prefix of completed files.- Throws:
NodeStartException
- will be throws if archive folder doesn't exists and not creatable.
-
FileRetentionThread
public FileRetentionThread(int retentionDays, String fileRetentionAction, String archiveFolder, String fileExtension, String dcOutputFolder, LoggerIfc logger) throws NodeStartException The constructor used initialize the parameters required for File Retention thread.- Parameters:
retentionDays
- number of days the files to retain in the output folderfileRetentionAction
- what to do on the older files after retention daysarchiveFolder
- the folder to which the files will be moved if archive action is selectedfileExtension
- the file extension used filtering completed files.dcOutputFolder
- the folder from which the files need to be moved/deletedlogger
- exception will be logged in this logger- Throws:
NodeStartException
- will be throws if archive folder doesn't exists and not creatable.
-
-
Method Details