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

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*.

Constructor & Destructor Documentation

◆ ExecutionTargetSorter() [1/4]

Arc::ExecutionTargetSorter::ExecutionTargetSorter ( const Broker b,
const std::list< URL > &  rejectEndpoints = std::list<URL>() 
)
inline

Basic constructor.

◆ ExecutionTargetSorter() [2/4]

Arc::ExecutionTargetSorter::ExecutionTargetSorter ( const Broker b,
const JobDescription j,
const std::list< URL > &  rejectEndpoints = std::list<URL>() 
)
inline

Constructor passing JobDescription.

◆ ExecutionTargetSorter() [3/4]

Arc::ExecutionTargetSorter::ExecutionTargetSorter ( const Broker b,
const std::list< ComputingServiceType > &  csList,
const std::list< URL > &  rejectEndpoints = std::list<URL>() 
)
inline

Constructor passing list of targets.

◆ ExecutionTargetSorter() [4/4]

Arc::ExecutionTargetSorter::ExecutionTargetSorter ( const Broker b,
const JobDescription j,
const std::list< ComputingServiceType > &  csList,
const std::list< URL > &  rejectEndpoints = std::list<URL>() 
)
inline

Constructor passing JobDescription and list of targets.

Member Function Documentation

◆ addEntities()

void Arc::ExecutionTargetSorter::addEntities ( const std::list< ComputingServiceType > &  )

Add a list of ComputingServiceTypes and rank them according to the Broker.

◆ addEntity() [1/2]

void Arc::ExecutionTargetSorter::addEntity ( const ExecutionTarget et)

Add an ExecutionTarget and rank it according to the Broker.

◆ addEntity() [2/2]

void Arc::ExecutionTargetSorter::addEntity ( const ComputingServiceType cs)
virtual

Add an ComputingServiceType and rank it according to the Broker.

Implements Arc::EntityConsumer< ComputingServiceType >.

◆ clear()

void Arc::ExecutionTargetSorter::clear ( )
inline

Clear lists of targets.

◆ endOfList()

bool Arc::ExecutionTargetSorter::endOfList ( ) const
inline

Returns true if current target is last in the list.

◆ getCurrentTarget()

const ExecutionTarget& Arc::ExecutionTargetSorter::getCurrentTarget ( ) const
inline

Returns current target.

◆ getMatchingTargets()

const std::list<ExecutionTarget>& Arc::ExecutionTargetSorter::getMatchingTargets ( ) const
inline

Get sorted list of matching targets.

◆ getNonMatchingTargets()

const std::list<ExecutionTarget>& Arc::ExecutionTargetSorter::getNonMatchingTargets ( ) const
inline

Get list of non-matching targets.

◆ next()

bool Arc::ExecutionTargetSorter::next ( )
inline

Advance to the next target. Returns false if the current target is the last one.

◆ operator*()

const ExecutionTarget& Arc::ExecutionTargetSorter::operator* ( void  ) const
inline

Returns current target.

◆ operator->()

const ExecutionTarget* Arc::ExecutionTargetSorter::operator-> ( void  ) const
inline

Returns pointer to current target.

◆ registerJobSubmission()

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.

◆ reset()

void Arc::ExecutionTargetSorter::reset ( void  )
inline

Reset to the first target in the ranked list.

◆ set() [1/2]

void Arc::ExecutionTargetSorter::set ( const Broker newBroker)
inline

Set a new Broker and recreate the ranked list of targets,.

◆ set() [2/2]

void Arc::ExecutionTargetSorter::set ( const JobDescription j)
inline

Set a new job description and recreate the ranked list of targets,.

◆ setRejectEndpoints()

void Arc::ExecutionTargetSorter::setRejectEndpoints ( const std::list< URL > &  newRejectEndpoints)
inline

Set a list of endpoints to reject when matching.


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