public class ReplicaLocation extends Data implements java.lang.Cloneable
org.griphyn.common.catalog.ReplicaCatalogEntry
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
mLFN
The LFN associated with the entry.
|
private java.util.List |
mPFNList
A list of
ReplicaCatalogEntry objects containing the PFN's
and associated attributes. |
static java.lang.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(java.lang.String lfn,
java.util.Collection pfns)
Overloaded constructor.
|
ReplicaLocation(java.lang.String lfn,
java.util.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(java.util.List tuples)
Add a PFN and it's attributes.
|
java.lang.Object |
clone()
Returns the clone of the object.
|
java.lang.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.
|
java.util.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. |
java.util.Iterator |
pfnIterator()
Returns an iterator to the list of
ReplicaCatalogEntry
objects. |
private void |
sanitize(java.util.List tuples)
Sanitizes a tuple list .
|
private void |
sanitize(ReplicaCatalogEntry tuple)
Sanitizes a tuple .
|
void |
setLFN(java.lang.String lfn)
Sets the LFN.
|
java.lang.String |
toString()
Returns the textual description of the data class.
|
setToString, vectorToString
public static final java.lang.String UNDEFINED_SITE_NAME
private java.lang.String mLFN
private java.util.List mPFNList
ReplicaCatalogEntry
objects containing the PFN's
and associated attributes.public ReplicaLocation()
public ReplicaLocation(java.lang.String lfn, java.util.List pfns)
lfn
- the logical filename.pfns
- the list of ReplicaCatalogEntry
objects.public ReplicaLocation(java.lang.String lfn, java.util.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(java.util.List tuples)
tuples
- the List
object of ReplicaCatalogEntry
objects, each containing the PFN and the attributes.public void setLFN(java.lang.String lfn)
lfn
- the lfn.public java.lang.String getLFN()
public ReplicaCatalogEntry getPFN(int index)
ReplicaCatalogEntry
index
- the pfn location.java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).public java.util.List getPFNList()
ReplicaCatalogEntry
objects.public java.util.Iterator pfnIterator()
ReplicaCatalogEntry
objects.public int getPFNCount()
public java.lang.Object clone()
clone
in class java.lang.Object
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 java.lang.String toString()
private void sanitize(java.util.List tuples)
tuples
- the tuple to be sanitized.private void sanitize(ReplicaCatalogEntry tuple)
tuple
- the tuple to be sanitized.