|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.classes.Data
edu.isi.pegasus.planner.classes.PegasusFile
edu.isi.pegasus.planner.classes.FileTransfer
public class FileTransfer
This is a container for the storing the transfers that are required in between sites. It refers to one lfn, but can contains more than one source and destination urls. All the source url's are presumed to be identical. The destination urls, can in effect be used to refer to TFN's for a lfn on different pools.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.isi.pegasus.planner.classes.PegasusFile |
|---|
PegasusFile.LINKAGE |
| Field Summary | |
|---|---|
private Map |
mDestMap
The map containing all the destination urls keyed by the pool id/name. |
private String |
mJob
The logical name of the asssociated VDS super node, with which the file is associated. |
private Map |
mSourceMap
The map containing all the source urls keyed by the pool id/name. |
| Fields inherited from class edu.isi.pegasus.planner.classes.PegasusFile |
|---|
DATA_FILE, DATA_TYPE, EXECUTABLE_FILE, EXECUTABLE_TYPE, mFlags, mLink, mLogicalFile, mSize, mTransferFlag, mType, NO_OF_TRANSIENT_FLAGS, OTHER_FILE, OTHER_TYPE, TRANSFER_MANDATORY, TRANSFER_NOT, TRANSFER_OPTIONAL, TRANSIENT_OPTIONAL_FLAG, TRANSIENT_REGISTRATION_FLAG |
| Fields inherited from class edu.isi.pegasus.planner.classes.Data |
|---|
mLogger, mLogMsg |
| Constructor Summary | |
|---|---|
FileTransfer()
Default constructor. |
|
FileTransfer(PegasusFile pf)
The overloaded constructor. |
|
FileTransfer(String lfn,
String job)
The overloaded constructor. |
|
FileTransfer(String lfn,
String job,
BitSet flags)
The overloaded constructor. |
|
| Method Summary | |
|---|---|
void |
addDestination(NameValue nv)
Adds a destination URL for the transfer. |
void |
addDestination(String pool,
String url)
Adds a destination URL for the transfer. |
void |
addSource(NameValue nv)
Adds a source URL for the transfer. |
void |
addSource(String pool,
String url)
Adds a source URL for the transfer. |
Object |
clone()
Returns a clone of the object. |
private String |
constructURL(String site,
String directory,
String filename)
Constructs a URL with the prefix as the poolname enclosed in #. |
NameValue |
getDestURL()
Returns a single destination url associated with the transfer. |
NameValue |
getDestURL(boolean random)
Returns a single destination url associated with the transfer. |
String |
getJobName()
It returns the name of the main/compute job making up the VDS supernode with which this transfer is related. |
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(Map m,
boolean random)
Returns a single url from the map passed. |
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(Map m)
Removes a single url from the map passed. |
String |
toString()
Returns a textual interpretation of the object. |
| Methods inherited from class edu.isi.pegasus.planner.classes.PegasusFile |
|---|
equals, fileOptional, getFlags, getLFN, getLinkage, getRegisterFlag, getSize, getTransferFlag, getTransientRegFlag, getTransientTransferFlag, getType, hashCode, setFileOptional, setLFN, setLinkage, setRegisterFlag, setSize, setSize, setTransferFlag, setTransferFlag, setTransferFlag, setTransientRegFlag, setType, setType, transferInRange, typeToString, typeValid |
| Methods inherited from class edu.isi.pegasus.planner.classes.Data |
|---|
setToString, vectorToString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String mJob
private Map mSourceMap
private Map mDestMap
| Constructor Detail |
|---|
public FileTransfer()
public FileTransfer(PegasusFile pf)
pf - PegasusFile object containing the transiency
attributes, and the logical name of the file.
public FileTransfer(String lfn,
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(String lfn,
String job,
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.| Method Detail |
|---|
public 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(String pool,
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(String pool,
String url)
pool - the pool to which the destination file is being transferred.url - the destination url.public 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(Map m,
boolean random)
m - the map containing the url'srandom - boolean indicating that a random url to be picked up.
private NameValue removeURL(Map m)
m - the map containing the url's
private String constructURL(String site,
String directory,
String filename)
site - the sitedirectory - the directoryfilename - the filename
public Object clone()
clone in class PegasusFilepublic boolean isValid()
public String toString()
toString in class PegasusFile
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||