public class FileTransfer extends PegasusFile
PegasusFile.LINKAGE
Modifier and Type | Field and Description |
---|---|
private java.util.Map |
mDestMap
The map containing all the destination urls keyed by the pool id/name.
|
private java.lang.String |
mJob
The logical name of the asssociated VDS super node, with which the file
is associated.
|
private int |
mPriority
A priority associated with the FileTransfer
|
private java.util.Map |
mSourceMap
The map containing all the source urls keyed by the pool id/name.
|
private java.lang.String |
mURLForRegistrationOnDestination
The registration URL for the file
|
CLEANUP_BIT_FLAG, DATA_FILE, DATA_TYPE, DO_NOT_REGISTER_BIT_FLAG, EXECUTABLE_FILE, EXECUTABLE_TYPE, mFlags, mLink, mLogicalFile, mSize, mTransferFlag, mType, NO_OF_TRANSIENT_FLAGS, OPTIONAL_BIT_FLAG, OTHER_FILE, OTHER_TYPE, TRANSFER_MANDATORY, TRANSFER_NOT, TRANSFER_OPTIONAL
Constructor and Description |
---|
FileTransfer()
Default constructor.
|
FileTransfer(PegasusFile pf)
The overloaded constructor.
|
FileTransfer(java.lang.String lfn,
java.lang.String job)
The overloaded constructor.
|
FileTransfer(java.lang.String lfn,
java.lang.String job,
java.util.BitSet flags)
The overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDestination(NameValue nv)
Adds a destination URL for the transfer.
|
void |
addDestination(java.lang.String pool,
java.lang.String url)
Adds a destination URL for the transfer.
|
void |
addSource(NameValue nv)
Adds a source URL for the transfer.
|
void |
addSource(java.lang.String pool,
java.lang.String url)
Adds a source URL for the transfer.
|
java.lang.Object |
clone()
Returns a clone of the object.
|
NameValue |
getDestURL()
Returns a single destination url associated with the transfer.
|
NameValue |
getDestURL(boolean random)
Returns a single destination url associated with the transfer.
|
java.lang.String |
getJobName()
It returns the name of the main/compute job making up the VDS supernode
with which this transfer is related.
|
int |
getPriority()
Sets the priority for the File Transfer
|
NameValue |
getSourceURL()
Returns a single source url associated with the transfer.
|
NameValue |
getSourceURL(boolean random)
Returns a single source url associated with the transfer.
|
private NameValue |
getURL(java.util.Map m,
boolean random)
Returns a single url from the map passed.
|
java.lang.String |
getURLForRegistrationOnDestination()
Sets the registration url for the destination.
|
boolean |
isTransferringExecutableFile()
Returns a boolean indicating if a file that is being staged is an
executable or not (i.e is a data file).
|
boolean |
isValid()
Determines whether the transfer contained in this container is valid or
not.
|
NameValue |
removeDestURL()
Removes a single destination url associated with the transfer.
|
NameValue |
removeSourceURL()
Removes a single source url associated with the transfer.
|
private NameValue |
removeURL(java.util.Map m)
Removes a single url from the map passed.
|
void |
setPriority(int priority)
Sets the priority for the File Transfer
|
void |
setURLForRegistrationOnDestination(java.lang.String url)
Sets the registration url for the destination.
|
java.lang.String |
toString()
Returns a textual interpretation of the object.
|
canBeCleanedup, equals, fileOptional, getFlags, getLFN, getLinkage, getRegisterFlag, getSize, getTransferFlag, getTransientRegFlag, getTransientTransferFlag, getType, hashCode, isExecutable, setFileOptional, setForCleanup, setForCleanup, setLFN, setLinkage, setRegisterFlag, setSize, setSize, setTransferFlag, setTransferFlag, setTransferFlag, setTransientRegFlag, setType, setType, transferInRange, typeToString, typeValid
setToString, vectorToString
private java.lang.String mJob
private java.util.Map mSourceMap
private java.util.Map mDestMap
private java.lang.String mURLForRegistrationOnDestination
private int mPriority
public FileTransfer()
public FileTransfer(PegasusFile pf)
pf
- PegasusFile
object containing the transiency
attributes, and the logical name of the file.public FileTransfer(java.lang.String lfn, java.lang.String job)
lfn
- The logical name of the file that has to be transferred.job
- The name of the job with which the transfer is
associated with.public FileTransfer(java.lang.String lfn, java.lang.String job, java.util.BitSet flags)
lfn
- The logical name of the file that has to be transferred.job
- The name of the job with which the transfer is
associated with.flags
- the BitSet flags.public java.lang.String getJobName()
public void addSource(NameValue nv)
nv
- the NameValue object containing the name of the site as the key
and URL as the value.public void addSource(java.lang.String pool, java.lang.String url)
pool
- the pool from which the source file is being transferred.url
- the source url.public void addDestination(NameValue nv)
nv
- the NameValue object containing the name of the site as the key
and URL as the value.public void addDestination(java.lang.String pool, java.lang.String url)
pool
- the pool to which the destination file is being transferred.url
- the destination url.public void setURLForRegistrationOnDestination(java.lang.String url)
url
- the urlpublic java.lang.String getURLForRegistrationOnDestination()
public void setPriority(int priority)
priority
- the priority associated with the FileTransferpublic int getPriority()
priority
- the priority associated with the FileTransferpublic NameValue getSourceURL()
public NameValue getSourceURL(boolean random)
random
- boolean indicating if a random entry needs to be picked.public NameValue getDestURL()
public NameValue getDestURL(boolean random)
random
- boolean indicating if a random entry needs to be picked.public NameValue removeSourceURL()
public NameValue removeDestURL()
public boolean isTransferringExecutableFile()
private NameValue getURL(java.util.Map m, boolean random)
m
- the map containing the url'srandom
- boolean indicating that a random url to be picked up.private NameValue removeURL(java.util.Map m)
m
- the map containing the url'spublic java.lang.Object clone()
clone
in class PegasusFile
public boolean isValid()
public java.lang.String toString()
toString
in class PegasusFile