edu.isi.pegasus.planner.transfer.refiner
Class Chain.SiteTransfer

java.lang.Object
  extended by edu.isi.pegasus.planner.transfer.refiner.Chain.SiteTransfer
Enclosing class:
Chain

private class Chain.SiteTransfer
extends Object

A container to manage the transfer jobs that are needed to be done on a single site. The container maintains the bundles and controls the distribution of a transfer job amongst the bundles in a round robin manner. Each bundle itself is actually a chain of transfer jobs.


Field Summary
private  List mBundles
          The list of Chain object.
private  int mCapacity
          The maximum number of transfer jobs that are allowed for this particular site.
private  int mNext
          The index of the bundle to which the next transfer for the site would be added to.
private  String mSite
          The site for which these transfers are grouped.
 
Constructor Summary
Chain.SiteTransfer()
          The default constructor.
Chain.SiteTransfer(String pool, int bundle)
          Convenience constructor.
 
Method Summary
 String addTransfer(String txJobName)
          Adds a file transfer to the appropriate TransferChain.
 String toString()
          Returns the textual description of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mCapacity

private int mCapacity
The maximum number of transfer jobs that are allowed for this particular site. This should correspond to the bundle factor.


mNext

private int mNext
The index of the bundle to which the next transfer for the site would be added to.


mSite

private String mSite
The site for which these transfers are grouped.


mBundles

private List mBundles
The list of Chain object. Each bundle is actually a chain of transfer nodes.

Constructor Detail

Chain.SiteTransfer

public Chain.SiteTransfer()
The default constructor.


Chain.SiteTransfer

public Chain.SiteTransfer(String pool,
                          int bundle)
Convenience constructor.

Parameters:
pool - the pool name for which transfers are being grouped.
bundle - the number of logical bundles that are to be created per site. it directly translates to the number of transfer jobs that can be running at a particular site
Method Detail

addTransfer

public String addTransfer(String txJobName)
Adds a file transfer to the appropriate TransferChain. The file transfers are added in a round robin manner underneath.

Parameters:
txJobName - the name of the transfer job.
Returns:
the last transfer job in the chain before the current job was added, null in case the job is the first in the chain

toString

public String toString()
Returns the textual description of the object.

Overrides:
toString in class Object
Returns:
the textual description.


Copyright © 2011 The University of Southern California. All Rights Reserved.