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 -
Method Summary
Modifier and TypeMethodDescriptionReturns 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, 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, String prefferedSite, boolean allowLocalFileURLs) Selects a single replica amongst all the replicas returned by the implementing Replica Mechanism.
-
Field Details
-
VERSION
The version of this API.- See Also:
-
LOCAL_SITE_HANDLE
The local site handle.- See Also:
-
PRIORITY_KEY
The attribute key that designates priority for the replica- See Also:
-
-
Method Details
-
selectAndOrderReplicas
edu.isi.pegasus.planner.classes.ReplicaLocation selectAndOrderReplicas(edu.isi.pegasus.planner.classes.ReplicaLocation rl, 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, 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
String description()Returns a short description of the replica selector, that is being implemented by the implementing class.- Returns:
- string corresponding to the description.
-