public class PlannerCache extends Data implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
private ReplicaCatalog |
mGetRCCache
The cache storing the GET urls for the files in the workflow
|
private PlannerOptions |
mPOptions
The planner options
|
private PegasusProperties |
mProps
The PegasusProperties
|
private ReplicaCatalog |
mPutRCCache
The cache storing the PUT urls for the files in the workflow
|
static java.lang.String |
PLANNER_CACHE_REPLICA_CATALOG_IMPLEMENTER
The name of the Replica Catalog Implementer that serves as the source for
cache files.
|
static java.lang.String |
PLANNER_CACHE_REPLICA_CATALOG_KEY
The name of the source key for Replica Catalog Implementer that serves as
cache
|
Constructor and Description |
---|
PlannerCache()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Explicitely free resources before the garbage collection hits.
|
private java.lang.String |
getCacheFileName(ADag adag,
FileServerType.OPERATION operation)
Constructs the basename to the cache file that is to be used
to log the transient files.
|
void |
initialize(PegasusBag bag,
ADag dag)
Initialize the replica catalog instances that make up the cache.
|
int |
insert(java.lang.String lfn,
java.lang.String pfn,
java.lang.String handle,
FileServerType.OPERATION type)
Inserts a new entry into the cache.
|
private ReplicaCatalog |
intializeRCAsCache(ADag dag,
FileServerType.OPERATION type)
Initializes the transient replica catalog and returns a handle to it.
|
ReplicaCatalogEntry |
lookup(java.lang.String lfn,
FileServerType.OPERATION type)
Retrieves all entries for a given LFN from the replica catalog.
|
java.lang.String |
lookup(java.lang.String lfn,
java.lang.String handle,
FileServerType.OPERATION type)
Retrieves the entry for a given filename and resource handle from
the replica catalog.
|
java.lang.String |
toString()
Returns the String version of the data object, which is in human readable
form.
|
setToString, vectorToString
public static final java.lang.String PLANNER_CACHE_REPLICA_CATALOG_KEY
public static final java.lang.String PLANNER_CACHE_REPLICA_CATALOG_IMPLEMENTER
private ReplicaCatalog mGetRCCache
private ReplicaCatalog mPutRCCache
private PlannerOptions mPOptions
private PegasusProperties mProps
public java.lang.String toString()
Data
public void initialize(PegasusBag bag, ADag dag)
bag
- dag
- public int insert(java.lang.String lfn, java.lang.String pfn, java.lang.String handle, FileServerType.OPERATION type)
lfn
- is the logical filename under which to book the entry.pfn
- is the physical filename associated with it.handle
- is a resource handle where the PFN resides.type
- the type of URL.public ReplicaCatalogEntry lookup(java.lang.String lfn, FileServerType.OPERATION type)
lfn
- is the logical filename to obtain information for.type
- the type of URL.ReplicaCatalogEntry
public java.lang.String lookup(java.lang.String lfn, java.lang.String handle, FileServerType.OPERATION type)
lfn
- is the logical filename to obtain information for.handle
- is the resource handle to obtain entries for.type
- the type of URL.null
if no match was found.public void close()
private ReplicaCatalog intializeRCAsCache(ADag dag, FileServerType.OPERATION type)
dag
- the workflow being plannedtype
- the url type that will be storedprivate java.lang.String getCacheFileName(ADag adag, FileServerType.OPERATION operation)
adag
- the ADag object containing the workflow that is being
concretized.