Class MasterServer.DownloadScheduler

All Implemented Interfaces:
MBeanService, MonitorCallback, Closeable, AutoCloseable, Runnable
Direct Known Subclasses:
MasterServer.AcqDownloadScheduler, MasterServer.DissDownloadScheduler
Enclosing class:
MasterServer

public abstract class MasterServer.DownloadScheduler extends MBeanScheduler
The Class DownloadScheduler.
  • Field Details

    • _minimumDuration

      public long _minimumDuration
      The _minimum duration.
    • _minimumRate

      public long _minimumRate
      The _minimum rate.
    • _debug

      public boolean _debug
      The _debug.
    • _processChecksum

      public boolean _processChecksum
      The _processChecksum.
  • Constructor Details

    • DownloadScheduler

      public DownloadScheduler(String name, String description)
      Instantiates a new download scheduler.
      Parameters:
      name - the name
      description - the description
  • Method Details

    • getDataTransfersToDownloadIterator

      public abstract Iterator<DataTransfer> getDataTransfersToDownloadIterator() throws IOException, SQLException
      Gets 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

      public String getActivity()
      Gets the activity.
      Overrides:
      getActivity in class ECaccessScheduler
      Returns:
      the activity
    • getThreadList

      public String getThreadList()
      Gets the thread list.
      Returns:
      the thread list
    • getDataTransfersCount

      public int getDataTransfersCount()
      Gets the total number of DataTransfers related to the DataFiles being retrieved.
      Returns:
      the count
    • getProgressInterface

      public ProgressInterface getProgressInterface(long dataFileId)
      Gets the progress interface.
      Parameters:
      dataFileId - the data file id
      Returns:
      the progress interface
    • interruptAllDownload

      public void interruptAllDownload(String destinationName, String message)
      Interrupt all downloads.
      Parameters:
      destinationName - the destination name
      message - the message
    • interruptDownload

      public boolean interruptDownload(DataTransfer transfer, String message)
      Interrupt download.
      Parameters:
      transfer - the transfer
      message - the message
      Returns:
      true, if successful
    • interruptDownload

      public boolean interruptDownload(long key, String message)
      Interrupt download.
      Parameters:
      key - the key
      message - the message
      Returns:
      true, if successful
    • getMBeanInfo

      public MBeanInfo getMBeanInfo()
      Gets the MBean info.
      Specified by:
      getMBeanInfo in interface MBeanService
      Overrides:
      getMBeanInfo in class MBeanScheduler
      Returns:
      the MBean info
    • invoke

      public Object invoke(String operationName, Object[] params, String[] signature) throws NoSuchMethodException, MBeanException
      Invoke.
      Specified by:
      invoke in interface MBeanService
      Overrides:
      invoke in class MBeanScheduler
      Parameters:
      operationName - the operation name
      params - the params
      signature - the signature
      Returns:
      the object
      Throws:
      NoSuchMethodException - the no such method exception
      MBeanException - the MBean exception
    • getAttribute

      public Object getAttribute(String attributeName) throws AttributeNotFoundException, MBeanException
      Gets the attribute.
      Specified by:
      getAttribute in interface MBeanService
      Overrides:
      getAttribute in class MBeanScheduler
      Parameters:
      attributeName - the attribute name
      Returns:
      the attribute
      Throws:
      AttributeNotFoundException - the attribute not found exception
      MBeanException - the MBean exception
    • setAttribute

      public boolean setAttribute(String name, Object value) throws InvalidAttributeValueException, MBeanException
      Sets the attribute.
      Specified by:
      setAttribute in interface MBeanService
      Overrides:
      setAttribute in class MBeanScheduler
      Parameters:
      name - the name
      value - the value
      Returns:
      true, if successful
      Throws:
      InvalidAttributeValueException - the invalid attribute value exception
      MBeanException - 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

      public int nextStep()
      Next step.
      Specified by:
      nextStep in class ECaccessScheduler
      Returns:
      the int