Package edu.isi.pegasus.planner.selector
Interface ReplicaSelector
-
- All Known Implementing Classes:
Default
,Local
,Regex
,Restricted
public interface ReplicaSelector
A prototypical interface for a replica selector. It would be changed when Pegasus interfaces with the new RC API.- Version:
- $Revision$
- Author:
- Karan Vahi, Gaurang Mehta
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LOCAL_SITE_HANDLE
The local site handle.static java.lang.String
PRIORITY_KEY
The attribute key that designates priority for the replicastatic java.lang.String
VERSION
The version of this API.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
description()
Returns a short description of the replica selector, that is being implemented by the implementing class.edu.isi.pegasus.planner.classes.ReplicaLocation
selectAndOrderReplicas(edu.isi.pegasus.planner.classes.ReplicaLocation rl, java.lang.String prefferedSite, boolean allowLocalFileURLs)
Select all candidate replicas for a LFN and order them.edu.isi.pegasus.planner.catalog.replica.ReplicaCatalogEntry
selectReplica(edu.isi.pegasus.planner.classes.ReplicaLocation rl, java.lang.String prefferedSite, boolean allowLocalFileURLs)
Selects a single replica amongst all the replicas returned by the implementing Replica Mechanism.
-
-
-
Field Detail
-
VERSION
static final java.lang.String VERSION
The version of this API.- See Also:
- Constant Field Values
-
LOCAL_SITE_HANDLE
static final java.lang.String LOCAL_SITE_HANDLE
The local site handle.- See Also:
- Constant Field Values
-
PRIORITY_KEY
static final java.lang.String PRIORITY_KEY
The attribute key that designates priority for the replica- See Also:
- Constant Field Values
-
-
Method Detail
-
selectAndOrderReplicas
edu.isi.pegasus.planner.classes.ReplicaLocation selectAndOrderReplicas(edu.isi.pegasus.planner.classes.ReplicaLocation rl, java.lang.String prefferedSite, boolean allowLocalFileURLs)
Select all candidate replicas for a LFN and order them.- Parameters:
rl
- theReplicaLocation
object containing all the pfn's associated with that LFN.prefferedSite
- the preffered site for picking up the replicas.allowLocalFileURLs
- indicates whether Replica Selector can select a replica on the local site / submit host.- Returns:
ReplicaLocation
corresponding to the replicas selected
-
selectReplica
edu.isi.pegasus.planner.catalog.replica.ReplicaCatalogEntry selectReplica(edu.isi.pegasus.planner.classes.ReplicaLocation rl, java.lang.String prefferedSite, boolean allowLocalFileURLs)
Selects a single replica amongst all the replicas returned by the implementing Replica Mechanism. If more than one replica is found to be matching the preffered site, a random replica is picked up from the matching replicas. Else, in case of no match any replica maybe returned.- Parameters:
rl
- theReplicaLocation
object containing all the pfn's associated with that LFN.prefferedSite
- the preffered site for picking up the replicas.allowLocalFileURLs
- indicates whether Replica Selector can select a replica on the local site / submit host.- Returns:
ReplicaCatalogEntry
corresponding to the location selected.- See Also:
ReplicaLocation
-
description
java.lang.String description()
Returns a short description of the replica selector, that is being implemented by the implementing class.- Returns:
- string corresponding to the description.
-
-