public class ReplicaLocation extends Data implements Cloneable
org.griphyn.common.catalog.ReplicaCatalogEntry
Modifier and Type | Field and Description |
---|---|
private String |
mLFN
The LFN associated with the entry.
|
private List |
mPFNList
A list of
ReplicaCatalogEntry objects containing the PFN's
and associated attributes. |
static String |
UNDEFINED_SITE_NAME
The site name that is associated in the case the resource handle is not
specified with the PFN.
|
Constructor and Description |
---|
ReplicaLocation()
Default constructor.
|
ReplicaLocation(String lfn,
Collection pfns)
Overloaded constructor.
|
ReplicaLocation(String lfn,
List pfns)
Overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPFN(PFN pfn)
Adds a PFN specified in the DAX to the object
|
void |
addPFN(ReplicaCatalogEntry tuple)
Add a PFN and it's attributes.
|
protected void |
addPFNs(List tuples)
Add a PFN and it's attributes.
|
Object |
clone()
Returns the clone of the object.
|
String |
getLFN()
Returns the associated LFN.
|
ReplicaCatalogEntry |
getPFN(int index)
Return a PFN as a
ReplicaCatalogEntry |
int |
getPFNCount()
Returns the number of pfn's associated with the lfn.
|
List |
getPFNList()
Returns the list of pfn's as
ReplicaCatalogEntry objects. |
boolean |
merge(ReplicaLocation location)
Merges the
ReplicaLocation object to the existing one,
only if the logical filenames match. |
Iterator |
pfnIterator()
Returns an iterator to the list of
ReplicaCatalogEntry
objects. |
private void |
sanitize(List tuples)
Sanitizes a tuple list .
|
private void |
sanitize(ReplicaCatalogEntry tuple)
Sanitizes a tuple .
|
void |
setLFN(String lfn)
Sets the LFN.
|
String |
toString()
Returns the textual description of the data class.
|
setToString, vectorToString
public static final String UNDEFINED_SITE_NAME
private String mLFN
private List mPFNList
ReplicaCatalogEntry
objects containing the PFN's
and associated attributes.public ReplicaLocation()
public ReplicaLocation(String lfn, List pfns)
lfn
- the logical filename.pfns
- the list of ReplicaCatalogEntry
objects.public ReplicaLocation(String lfn, Collection pfns)
lfn
- the logical filename.pfns
- the list of ReplicaCatalogEntry
objects.public void addPFN(PFN pfn)
pfn
- the PFNpublic void addPFN(ReplicaCatalogEntry tuple)
tuple
- the ReplicaCatalogEntry
object containing the
PFN and the attributes.protected void addPFNs(List tuples)
tuples
- the List
object of ReplicaCatalogEntry
objects, each containing the PFN and the attributes.public void setLFN(String lfn)
lfn
- the lfn.public String getLFN()
public ReplicaCatalogEntry getPFN(int index)
ReplicaCatalogEntry
index
- the pfn location.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).public List getPFNList()
ReplicaCatalogEntry
objects.public Iterator pfnIterator()
ReplicaCatalogEntry
objects.public int getPFNCount()
public Object clone()
public boolean merge(ReplicaLocation location)
ReplicaLocation
object to the existing one,
only if the logical filenames match.location
- is another ReplicaLocations
to merge with.public String toString()
private void sanitize(List tuples)
tuples
- the tuple to be sanitized.private void sanitize(ReplicaCatalogEntry tuple)
tuple
- the tuple to be sanitized.Copyright © 2011 The University of Southern California. All Rights Reserved.