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 final String
    The local site handle.
    static final String
    The attribute key that designates priority for the replica
    static final String
    The version of this API.
  • Method Summary

    Modifier and Type
    Method
    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, 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

  • 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 - the ReplicaLocation 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 - the ReplicaLocation 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.