Class TransferManagement

java.lang.Object
ecmwf.ecpds.master.transfer.TransferManagement

public final class TransferManagement extends Object
The Class TransferManagement.
  • Method Details

    • getUniqueKey

      public static String getUniqueKey(boolean standBy, String destination, String target, String uniqueName)
      Gets the unique key for a data transfer request.
      Parameters:
      standBy - is it a standby transfer
      destination - the destination name
      target - the target name
      uniqueName - the unique name
      Returns:
      the string
    • getTargetName

      public static String getTargetName(DataTransfer transfer, String template) throws ecmwf.ecpds.master.transfer.DirectoryException, DataBaseException
      Gets the target name.
      Parameters:
      transfer - the transfer
      template - the template
      Returns:
      the target name
      Throws:
      ecmwf.ecpds.master.transfer.DirectoryException - the directory exception
      DataBaseException - the data base exception
    • getTargetName

      public static String getTargetName(DataTransfer transfer, String template, String message) throws ecmwf.ecpds.master.transfer.DirectoryException, DataBaseException
      Gets the target name.
      Parameters:
      transfer - the transfer
      template - the template
      message - the message
      Returns:
      the target name
      Throws:
      ecmwf.ecpds.master.transfer.DirectoryException - the directory exception
      DataBaseException - the data base exception
    • getTargetName

      public static String getTargetName(DataTransfer transfer, String template, String message, String moverName, Collection<MetadataValue> metadataValues) throws ecmwf.ecpds.master.transfer.DirectoryException, DataBaseException
      Gets the target name.
      Parameters:
      transfer - the transfer
      template - the template
      message - the message
      moverName - the mover name
      metadataValues - the metadata values
      Returns:
      the target name
      Throws:
      ecmwf.ecpds.master.transfer.DirectoryException - the directory exception
      DataBaseException - the data base exception
    • getConnectOptions

      public static String getConnectOptions(DataTransfer transfer, String targetName, String moverName, Collection<MetadataValue> metadataValues) throws DataBaseException
      Gets the connect options. Allow preparing the connect options for the notification and/or allocate system.
      Parameters:
      transfer - the transfer
      targetName - the target name
      moverName - the mover name
      metadataValues - the metadata values
      Returns:
      the connect options
      Throws:
      DataBaseException - the data base exception
    • getETag

      public static String getETag(DataFile dataFile)
      Gets the E tag.
      Parameters:
      dataFile - the data file
      Returns:
      the string
    • parseETag

      public static long parseETag(String etag)
      Extract the dataFileId from the etag.
      Parameters:
      etag - the etag
      Returns:
      the string
    • put

      public static DataTransfer put(String moverName, MoverInterface mover, Host[] hostsForSource, DataTransfer transfer) throws ecmwf.ecpds.master.transfer.DirectoryException, DataBaseException, SourceNotAvailableException, ECtransException, IOException
      Puts the.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      hostsForSource - the hosts for source
      transfer - the transfer
      Returns:
      the data transfer
      Throws:
      ecmwf.ecpds.master.transfer.DirectoryException - the directory exception
      DataBaseException - the data base exception
      SourceNotAvailableException - the source not available exception
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
    • put

      public static ProxySocket put(String moverName, MoverInterface mover, Host host, String target, long remotePosn, long size) throws ECtransException, IOException
      Puts the.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      host - the host
      target - the target
      remotePosn - the remote posn
      size - the size
      Returns:
      the proxy socket
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
    • get

      public static ProxySocket get(String moverName, MoverInterface mover, Host host, String source, long remotePosn, boolean removeOriginal) throws ECtransException, IOException
      Gets the.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      host - the host
      source - the source
      remotePosn - the remote posn
      removeOriginal - the remove original
      Returns:
      the proxy socket
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
    • get

      public static ProxySocket get(String moverName, MoverInterface mover, Host[] hostsForSource, DataFile dataFile, long remotePosn, long length) throws SourceNotAvailableException, IOException
      Gets the.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      hostsForSource - the hosts for source
      dataFile - the data file
      remotePosn - the remote posn
      length - the length
      Returns:
      the proxy socket
      Throws:
      SourceNotAvailableException - the source not available exception
      IOException - Signals that an I/O exception has occurred.
    • size

      public static long size(String moverName, MoverInterface mover, Host host, String source) throws ECtransException, IOException
      Size.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      host - the host
      source - the source
      Returns:
      the long
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
    • list

      public static String[] list(String moverName, MoverInterface mover, Host host, String source, String pattern) throws ECtransException, IOException
      List.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      host - the host
      source - the source
      pattern - the pattern
      Returns:
      the string[]
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
    • del

      public static void del(String moverName, MoverInterface mover, Host host, String source) throws ECtransException, IOException
      Del.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      host - the host
      source - the source
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
    • mkdir

      public static void mkdir(String moverName, MoverInterface mover, Host host, String dir) throws ECtransException, IOException
      Mkdir.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      host - the host
      dir - the dir
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
    • rmdir

      public static void rmdir(String moverName, MoverInterface mover, Host host, String dir) throws ECtransException, IOException
      Rmdir.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      host - the host
      dir - the dir
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
    • move

      public static void move(String moverName, MoverInterface mover, Host host, String source, String target) throws ECtransException, IOException
      Move.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      host - the host
      source - the source
      target - the target
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.
    • check

      public static void check(String moverName, MoverInterface mover, long ticket) throws ECtransException, IOException
      Check.
      Parameters:
      moverName - the name of the mover
      mover - the mover
      ticket - the ticket
      Throws:
      ECtransException - the ectrans exception
      IOException - Signals that an I/O exception has occurred.