Class MasterServer.DownloadScheduler
java.lang.Object
ecmwf.common.technical.ThreadService.ConfigurableRunnable
ecmwf.common.technical.WakeupThread
ecmwf.common.ecaccess.ECaccessScheduler
ecmwf.common.ecaccess.MBeanScheduler
ecmwf.ecpds.master.MasterServer.DownloadScheduler
- All Implemented Interfaces:
MBeanService
,MonitorCallback
,Closeable
,AutoCloseable
,Runnable
- Direct Known Subclasses:
MasterServer.AcqDownloadScheduler
,MasterServer.DissDownloadScheduler
- Enclosing class:
MasterServer
The Class DownloadScheduler.
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
The _debug.long
The _minimum duration.long
The _minimum rate.boolean
The _processChecksum.Fields inherited from class ecmwf.common.ecaccess.ECaccessScheduler
NEXT_STEP_ABORT, NEXT_STEP_CONTINUE, NEXT_STEP_DELAY, NEXT_STEP_INIT, SCHEDULER_STATE_CLOSING, SCHEDULER_STATE_JAMMED, SCHEDULER_STATE_OFFLINE, SCHEDULER_STATE_ONHOLD, SCHEDULER_STATE_ONLINE, SCHEDULER_STATE_OPENING, states, steps
-
Constructor Summary
ConstructorsConstructorDescriptionDownloadScheduler
(String name, String description) Instantiates a new download scheduler. -
Method Summary
Modifier and TypeMethodDescriptionGets the activity.getAttribute
(String attributeName) Gets the attribute.int
Gets the total number of DataTransfers related to the DataFiles being retrieved.abstract Iterator
<DataTransfer> Gets the data transfers to download iterator.int
Gets the download threads count.int
Gets the max download threads.Gets the MBean info.boolean
getPause()
Gets the pause.getProgressInterface
(long dataFileId) Gets the progress interface.Gets the thread list.long
Gets the time out download thread.void
interruptAllDownload
(String destinationName, String message) Interrupt all downloads.boolean
interruptDownload
(long key, String message) Interrupt download.boolean
interruptDownload
(DataTransfer transfer, String message) Interrupt download.Invoke.int
nextStep()
Next step.boolean
setAttribute
(String name, Object value) Sets the attribute.void
setMaxDownloadThreads
(int maxDownloadThreads) Sets the max download threads.void
setPause
(boolean pause) Sets the pause.void
setTimeOutDownloadThread
(long timeOutDownloadThread) Sets the time out download thread.Methods inherited from class ecmwf.common.ecaccess.MBeanScheduler
close, getMonitorName, shutdown
Methods inherited from class ecmwf.common.ecaccess.ECaccessScheduler
configurableRun, deactivateMonitor, getDelay, getJammedTimeout, getLastStepTime, getMonitorManager, getNextStep, getSchedulerState, getStartDate, getStepTime, initialize, isInitialized, isJammed, isOnHold, isRunning, onHold, setDelay, setJammedTimeout, setOnhold, setTimeRanges, start, wakeup
Methods inherited from class ecmwf.common.technical.WakeupThread
isSleeping, waitFor
Methods inherited from class ecmwf.common.technical.ThreadService.ConfigurableRunnable
execute, execute, getContextClassLoader, getPriority, getThreadName, interrupt, interrupted, isAlive, isStarted, join, join, run, setContextClassLoader, setForceCookie, setInheritCookie, setPriority, setThreadNameAndCookie
-
Field Details
-
_minimumDuration
public long _minimumDurationThe _minimum duration. -
_minimumRate
public long _minimumRateThe _minimum rate. -
_debug
public boolean _debugThe _debug. -
_processChecksum
public boolean _processChecksumThe _processChecksum.
-
-
Constructor Details
-
DownloadScheduler
-
-
Method Details
-
getDataTransfersToDownloadIterator
public abstract Iterator<DataTransfer> getDataTransfersToDownloadIterator() throws IOException, SQLExceptionGets the data transfers to download iterator.- Returns:
- the data transfers to download iterator
- Throws:
IOException
- Signals that an I/O exception has occurred.SQLException
- the SQL exception
-
setMaxDownloadThreads
public void setMaxDownloadThreads(int maxDownloadThreads) Sets the max download threads.- Parameters:
maxDownloadThreads
- the new max download threads
-
setTimeOutDownloadThread
public void setTimeOutDownloadThread(long timeOutDownloadThread) Sets the time out download thread.- Parameters:
timeOutDownloadThread
- the new time out download thread
-
getMaxDownloadThreads
public int getMaxDownloadThreads()Gets the max download threads.- Returns:
- the max download threads
-
getTimeOutDownloadThread
public long getTimeOutDownloadThread()Gets the time out download thread.- Returns:
- the time out download thread
-
getDownloadThreadsCount
public int getDownloadThreadsCount()Gets the download threads count.- Returns:
- the download threads count
-
getActivity
Gets the activity.- Overrides:
getActivity
in classECaccessScheduler
- Returns:
- the activity
-
getThreadList
-
getDataTransfersCount
public int getDataTransfersCount()Gets the total number of DataTransfers related to the DataFiles being retrieved.- Returns:
- the count
-
getProgressInterface
Gets the progress interface.- Parameters:
dataFileId
- the data file id- Returns:
- the progress interface
-
interruptAllDownload
-
interruptDownload
Interrupt download.- Parameters:
transfer
- the transfermessage
- the message- Returns:
- true, if successful
-
interruptDownload
Interrupt download.- Parameters:
key
- the keymessage
- the message- Returns:
- true, if successful
-
getMBeanInfo
Gets the MBean info.- Specified by:
getMBeanInfo
in interfaceMBeanService
- Overrides:
getMBeanInfo
in classMBeanScheduler
- Returns:
- the MBean info
-
invoke
public Object invoke(String operationName, Object[] params, String[] signature) throws NoSuchMethodException, MBeanException Invoke.- Specified by:
invoke
in interfaceMBeanService
- Overrides:
invoke
in classMBeanScheduler
- Parameters:
operationName
- the operation nameparams
- the paramssignature
- the signature- Returns:
- the object
- Throws:
NoSuchMethodException
- the no such method exceptionMBeanException
- the MBean exception
-
getAttribute
Gets the attribute.- Specified by:
getAttribute
in interfaceMBeanService
- Overrides:
getAttribute
in classMBeanScheduler
- Parameters:
attributeName
- the attribute name- Returns:
- the attribute
- Throws:
AttributeNotFoundException
- the attribute not found exceptionMBeanException
- the MBean exception
-
setAttribute
public boolean setAttribute(String name, Object value) throws InvalidAttributeValueException, MBeanException Sets the attribute.- Specified by:
setAttribute
in interfaceMBeanService
- Overrides:
setAttribute
in classMBeanScheduler
- Parameters:
name
- the namevalue
- the value- Returns:
- true, if successful
- Throws:
InvalidAttributeValueException
- the invalid attribute value exceptionMBeanException
- the MBean exception
-
setPause
public void setPause(boolean pause) Sets the pause.- Parameters:
pause
- the new pause
-
getPause
public boolean getPause()Gets the pause.- Returns:
- the pause
-
nextStep
-