Package de.dlr.proseo.api.basemon
Klasse BaseMonitor
java.lang.Object
java.lang.Thread
de.dlr.proseo.api.basemon.BaseMonitor
- Alle implementierten Schnittstellen:
Runnable
Base class for implementing monitors on pickup points ("interface points" in the ESA Ground Segment Framework architecture). The
monitor is intended to run "forever" (i. e. until it is shut down by an interrupt), so it does not terminate on errors during
transfer or follow-up actions. It does terminate if it cannot correctly write its transfer history.
- Autor:
- Dr. Thomas Bassler
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic class
Structure for controlling the transfer processVon Klasse geerbte verschachtelte Klassen/Schnittstellen java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Feldübersicht
Von Klasse geerbte Felder java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected abstract BaseMonitor.TransferControl
checkAvailableDownloads
(Instant referenceTimeStamp) Check the pickup point for available objects (unfiltered)long
Gets the interval between pickup point checksGets the period to retain transfer history entries forint
Gets the maximum number of parallel download threadsint
Gets the maximum number of wait cycles for task completion checksint
Gets the interval to check for completed subtasksGets the file path of the transfer history filelong
Gets the interval to truncate transfer history filevoid
run()
Run forever (as required by Thread superclass, at the same time convenience function for callingrun(Integer)
with anull
argument)void
Monitoring loop: Check data availability on pickup point Filter objects not yet processed from transfer history For all objects not yet processed: Transfer object to local target directory Record transfer in history Trigger follow-on actionvoid
setCheckInterval
(long checkInterval) Sets the interval between pickup point checksvoid
setHistoryRetentionDuration
(Duration historyRetentionDuration) Sets the period to retain transfer history entries forvoid
setMaxDownloadThreads
(int maxDownloadThreads) Sets the maximum number of parallel download threadsvoid
setMaxWaitCycles
(int maxWaitCycles) Sets the maximum number of wait cycles for task completion checksvoid
setTaskWaitInterval
(int taskWaitInterval) Sets the interval to check for completed subtasksvoid
setTransferHistoryFile
(Path transferHistoryFile) Gets the file path of the transfer history filevoid
setTruncateInterval
(long truncateInterval) Sets the interval to truncate transfer history fileprotected abstract boolean
transferToTargetDir
(TransferObject object) Download the given transfer object from the pickup point and copy it to the configured target directoryprotected abstract boolean
triggerFollowOnAction
(TransferObject object) Trigger any necessary follow-on action on the transfer object (processing, order generation etc.)Von Klasse geerbte Methoden 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
-
Konstruktordetails
-
BaseMonitor
public BaseMonitor()
-
-
Methodendetails
-
getCheckInterval
public long getCheckInterval()Gets the interval between pickup point checks- Gibt zurück:
- the checkInterval the interval in milliseconds
-
setCheckInterval
public void setCheckInterval(long checkInterval) Sets the interval between pickup point checks- Parameter:
checkInterval
- the check interval to set in milliseconds
-
getTransferHistoryFile
Gets the file path of the transfer history file- Gibt zurück:
- the path to the transfer history file
-
setTransferHistoryFile
Gets the file path of the transfer history file- Parameter:
transferHistoryFile
- the path to the transfer history file to set
-
getTruncateInterval
public long getTruncateInterval()Gets the interval to truncate transfer history file- Gibt zurück:
- the truncation interval
-
setTruncateInterval
public void setTruncateInterval(long truncateInterval) Sets the interval to truncate transfer history file- Parameter:
truncateInterval
- the truncation interval to set
-
getHistoryRetentionDuration
Gets the period to retain transfer history entries for- Gibt zurück:
- the history retention duration
-
setHistoryRetentionDuration
Sets the period to retain transfer history entries for- Parameter:
historyRetentionDuration
- the history retention duration to set
-
getMaxDownloadThreads
public int getMaxDownloadThreads()Gets the maximum number of parallel download threads- Gibt zurück:
- the maximum number of download threads
-
setMaxDownloadThreads
public void setMaxDownloadThreads(int maxDownloadThreads) Sets the maximum number of parallel download threads- Parameter:
maxDownloadThreads
- the maximum number of download threads to set
-
getTaskWaitInterval
public int getTaskWaitInterval()Gets the interval to check for completed subtasks- Gibt zurück:
- the task wait interval in millliseconds
-
setTaskWaitInterval
public void setTaskWaitInterval(int taskWaitInterval) Sets the interval to check for completed subtasks- Parameter:
taskWaitInterval
- the task wait interval in millliseconds to set
-
getMaxWaitCycles
public int getMaxWaitCycles()Gets the maximum number of wait cycles for task completion checks- Gibt zurück:
- the maximum number of wait cycles
-
setMaxWaitCycles
public void setMaxWaitCycles(int maxWaitCycles) Sets the maximum number of wait cycles for task completion checks- Parameter:
maxWaitCycles
- the maximum number of wait cycles to set
-
checkAvailableDownloads
Check the pickup point for available objects (unfiltered)- Parameter:
referenceTimeStamp
- the reference timestamp to apply for pickup point lookups- Gibt zurück:
- a transfer control object containing the latest reference time and a list of available transfer objects
-
transferToTargetDir
Download the given transfer object from the pickup point and copy it to the configured target directory- Parameter:
object
- the transfer object to download- Gibt zurück:
- true, if the download was successful, false otherwise
-
triggerFollowOnAction
Trigger any necessary follow-on action on the transfer object (processing, order generation etc.)- Parameter:
object
- the transfer object to start the action on- Gibt zurück:
- true, if starting the action succeeded (not necessarily the action itself), false otherwise
-
run
Monitoring loop:- Check data availability on pickup point
- Filter objects not yet processed from transfer history
- For all objects not yet processed:
- Transfer object to local target directory
- Record transfer in history
- Trigger follow-on action
- Parameter:
maxCycles
- maximum number of loop cycles (if null, run forever)
-
run
public void run()Run forever (as required by Thread superclass, at the same time convenience function for callingrun(Integer)
with anull
argument)
-