ARC SDK
Public Member Functions
Arc::ExecutionTargetSorter Class Reference

Wrapper around Broker functionality. More...

#include <arc/compute/Broker.h>

Inheritance diagram for Arc::ExecutionTargetSorter:
Arc::EntityConsumer< ComputingServiceType >

Public Member Functions

 ExecutionTargetSorter (const Broker &b, const std::list< URL > &rejectEndpoints=std::list< URL >())
 Basic constructor.
 
 ExecutionTargetSorter (const Broker &b, const JobDescription &j, const std::list< URL > &rejectEndpoints=std::list< URL >())
 Constructor passing JobDescription.
 
 ExecutionTargetSorter (const Broker &b, const std::list< ComputingServiceType > &csList, const std::list< URL > &rejectEndpoints=std::list< URL >())
 Constructor passing list of targets.
 
 ExecutionTargetSorter (const Broker &b, const JobDescription &j, const std::list< ComputingServiceType > &csList, const std::list< URL > &rejectEndpoints=std::list< URL >())
 Constructor passing JobDescription and list of targets.
 
void addEntity (const ExecutionTarget &et)
 Add an ExecutionTarget and rank it according to the Broker.
 
void addEntity (const ComputingServiceType &cs)
 Add an ComputingServiceType and rank it according to the Broker.
 
void addEntities (const std::list< ComputingServiceType > &)
 Add a list of ComputingServiceTypes and rank them according to the Broker.
 
void reset ()
 Reset to the first target in the ranked list.
 
bool next ()
 Advance to the next target. Returns false if the current target is the last one.
 
bool endOfList () const
 Returns true if current target is last in the list.
 
const ExecutionTargetoperator* () const
 Returns current target.
 
const ExecutionTargetgetCurrentTarget () const
 Returns current target.
 
const ExecutionTargetoperator-> () const
 Returns pointer to current target.
 
const std::list
< ExecutionTarget > & 
getMatchingTargets () const
 Get sorted list of matching targets.
 
const std::list
< ExecutionTarget > & 
getNonMatchingTargets () const
 Get list of non-matching targets.
 
void clear ()
 Clear lists of targets.
 
void registerJobSubmission ()
 Register that job was submitted to current target. More...
 
void set (const Broker &newBroker)
 Set a new Broker and recreate the ranked list of targets,.
 
void set (const JobDescription &j)
 Set a new job description and recreate the ranked list of targets,.
 
void setRejectEndpoints (const std::list< URL > &newRejectEndpoints)
 Set a list of endpoints to reject when matching.
 

Detailed Description

Wrapper around Broker functionality.

This class can be used instead of calling Broker methods directly. It automatically takes care of matching and sorting ExecutionTargets. It can be thought of as an iterator over the list of sorted targets and supports some iterator-style methods such as next(), operator-> and operator*.

Member Function Documentation

void Arc::ExecutionTargetSorter::registerJobSubmission ( )

Register that job was submitted to current target.

When brokering many jobs at once this method can be called after each job submission to update the information held about the target it was submitted to, such as number of free slots or free disk space.


The documentation for this class was generated from the following file: