Class TransferManagement
java.lang.Object
ecmwf.ecpds.master.transfer.TransferManagement
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
check
(String moverName, MoverInterface mover, long ticket) Check.static void
del
(String moverName, MoverInterface mover, Host host, String source) Del.static ProxySocket
get
(String moverName, MoverInterface mover, Host[] hostsForSource, DataFile dataFile, long remotePosn, long length) Gets the.static ProxySocket
get
(String moverName, MoverInterface mover, Host host, String source, long remotePosn, boolean removeOriginal) Gets the.static String
getConnectOptions
(DataTransfer transfer, String targetName, String moverName, Collection<MetadataValue> metadataValues) Gets the connect options.static String
Gets the E tag.static String
getTargetName
(DataTransfer transfer, String template) Gets the target name.static String
getTargetName
(DataTransfer transfer, String template, String message) Gets the target name.static String
getTargetName
(DataTransfer transfer, String template, String message, String moverName, Collection<MetadataValue> metadataValues) Gets the target name.static String
getUniqueKey
(boolean standBy, String destination, String target, String uniqueName) Gets the unique key for a data transfer request.static String[]
List.static void
mkdir
(String moverName, MoverInterface mover, Host host, String dir) Mkdir.static void
Move.static long
Extract the dataFileId from the etag.static DataTransfer
put
(String moverName, MoverInterface mover, Host[] hostsForSource, DataTransfer transfer) Puts the.static ProxySocket
put
(String moverName, MoverInterface mover, Host host, String target, long remotePosn, long size) Puts the.static void
rmdir
(String moverName, MoverInterface mover, Host host, String dir) Rmdir.static long
size
(String moverName, MoverInterface mover, Host host, String source) Size.
-
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 transferdestination
- the destination nametarget
- the target nameuniqueName
- 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 transfertemplate
- the template- Returns:
- the target name
- Throws:
ecmwf.ecpds.master.transfer.DirectoryException
- the directory exceptionDataBaseException
- 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 transfertemplate
- the templatemessage
- the message- Returns:
- the target name
- Throws:
ecmwf.ecpds.master.transfer.DirectoryException
- the directory exceptionDataBaseException
- 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 transfertemplate
- the templatemessage
- the messagemoverName
- the mover namemetadataValues
- the metadata values- Returns:
- the target name
- Throws:
ecmwf.ecpds.master.transfer.DirectoryException
- the directory exceptionDataBaseException
- 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 transfertargetName
- the target namemoverName
- the mover namemetadataValues
- the metadata values- Returns:
- the connect options
- Throws:
DataBaseException
- the data base exception
-
getETag
-
parseETag
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 movermover
- the moverhostsForSource
- the hosts for sourcetransfer
- the transfer- Returns:
- the data transfer
- Throws:
ecmwf.ecpds.master.transfer.DirectoryException
- the directory exceptionDataBaseException
- the data base exceptionSourceNotAvailableException
- the source not available exceptionECtransException
- the ectrans exceptionIOException
- 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 movermover
- the moverhost
- the hosttarget
- the targetremotePosn
- the remote posnsize
- the size- Returns:
- the proxy socket
- Throws:
ECtransException
- the ectrans exceptionIOException
- 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 movermover
- the moverhost
- the hostsource
- the sourceremotePosn
- the remote posnremoveOriginal
- the remove original- Returns:
- the proxy socket
- Throws:
ECtransException
- the ectrans exceptionIOException
- 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 movermover
- the moverhostsForSource
- the hosts for sourcedataFile
- the data fileremotePosn
- the remote posnlength
- the length- Returns:
- the proxy socket
- Throws:
SourceNotAvailableException
- the source not available exceptionIOException
- 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 movermover
- the moverhost
- the hostsource
- the source- Returns:
- the long
- Throws:
ECtransException
- the ectrans exceptionIOException
- 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 movermover
- the moverhost
- the hostsource
- the sourcepattern
- the pattern- Returns:
- the string[]
- Throws:
ECtransException
- the ectrans exceptionIOException
- 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 movermover
- the moverhost
- the hostsource
- the source- Throws:
ECtransException
- the ectrans exceptionIOException
- 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 movermover
- the moverhost
- the hostdir
- the dir- Throws:
ECtransException
- the ectrans exceptionIOException
- 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 movermover
- the moverhost
- the hostdir
- the dir- Throws:
ECtransException
- the ectrans exceptionIOException
- 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 movermover
- the moverhost
- the hostsource
- the sourcetarget
- the target- Throws:
ECtransException
- the ectrans exceptionIOException
- 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 movermover
- the moverticket
- the ticket- Throws:
ECtransException
- the ectrans exceptionIOException
- Signals that an I/O exception has occurred.
-