ARC SDK
Public Member Functions
Arc::ComputingServiceRetriever Class Reference

Retrieves information about computing elements by querying service registries and CE information systems. More...

#include <arc/compute/ComputingServiceRetriever.h>

Inheritance diagram for Arc::ComputingServiceRetriever:
Arc::EntityContainer< ComputingServiceType > Arc::EntityConsumer< Endpoint > Arc::EntityConsumer< ComputingServiceType >

Public Member Functions

 ComputingServiceRetriever (const UserConfig &uc, const std::list< Endpoint > &services=std::list< Endpoint >(), const std::list< std::string > &rejectedServices=std::list< std::string >(), const std::set< std::string > &preferredInterfaceNames=std::set< std::string >(), const std::list< std::string > &capabilityFilter=std::list< std::string >(1, Endpoint::GetStringForCapability(Arc::Endpoint::COMPUTINGINFO)))
 Creates a ComputingServiceRetriever with a list of services to query. More...
 
void wait ()
 Waits for all the results to arrive. More...
 
void addEndpoint (const Endpoint &service)
 Adds a new service (registry or computing element) to query. More...
 
void addEntity (const Endpoint &service)
 Adds a new service to query (used by the internal ServiceEndpointRetriever) More...
 
void addConsumer (EntityConsumer< ComputingServiceType > &addConsumer_consumer)
 Add a consumer to the ComputingServiceRetriever which will get the results. More...
 
void removeConsumer (const EntityConsumer< ComputingServiceType > &removeConsumer_consumer)
 Remove a previously added consumer from this ComputingServiceRetriever. More...
 
void GetExecutionTargets (std::list< ExecutionTarget > &etList)
 Convenience method to generate ExectionTarget objects from the resulted ComputingServiceType objects. More...
 
EndpointStatusMap getAllStatuses () const
 Get status of all the queried Endpoint objects. More...
 
- Public Member Functions inherited from Arc::EntityContainer< ComputingServiceType >
virtual void addEntity (const ComputingServiceType &t)
 All the consumed entities are pushed to the list. More...
 

Detailed Description

Retrieves information about computing elements by querying service registries and CE information systems.

The ComputingServiceRetriever queries service registries and local information systems of computing elements, creates ComputingServiceType objects from the retrieved information and besides storing those objects also sends them to all the registered consumers.

Constructor & Destructor Documentation

◆ ComputingServiceRetriever()

Arc::ComputingServiceRetriever::ComputingServiceRetriever ( const UserConfig uc,
const std::list< Endpoint > &  services = std::list< Endpoint >(),
const std::list< std::string > &  rejectedServices = std::list< std::string >(),
const std::set< std::string > &  preferredInterfaceNames = std::set< std::string >(),
const std::list< std::string > &  capabilityFilter = std::list< std::string >(1, Endpoint::GetStringForCapability(Arc::Endpoint::COMPUTINGINFO)) 
)

Creates a ComputingServiceRetriever with a list of services to query.

Parameters
[in]ucthe UserConfig object containing the credentails to use for connecting services
[in]servicesa list of Endpoint objects containing the services (registries or CEs) to query
[in]rejectedServicesif the URL of a service matches an element in this list, the service will not be queried
[in]preferredInterfaceNameswhen an Endpoint does not have it's GLUE2 interface name specified the class will try interfaces specified here first, and if they return no results, then all the other possible interfaces are tried
[in]capabilityFilteronly those ComputingServiceType objects will be sent to the consumer which has at least one of the capabilities provided here

Member Function Documentation

◆ addConsumer()

void Arc::ComputingServiceRetriever::addConsumer ( EntityConsumer< ComputingServiceType > &  addConsumer_consumer)
inline

Add a consumer to the ComputingServiceRetriever which will get the results.

All the consumers will receive all the retrieved ComputingServiceType objects one by one.

Parameters
[in]cone consumer of the type EntityConsumer<ComputingServiceType> capable of accepting ComputingServiceType objects

◆ addEndpoint()

void Arc::ComputingServiceRetriever::addEndpoint ( const Endpoint service)

Adds a new service (registry or computing element) to query.

Depending on the type of the service, it will be added to the internal ServiceEndpointRetriever (if it's a registry) or the internal TargetInformationRetriever (if it's a computing element).

Parameters
[in]servicean Endpoint refering to a service to query

◆ addEntity()

void Arc::ComputingServiceRetriever::addEntity ( const Endpoint service)
inlinevirtual

Adds a new service to query (used by the internal ServiceEndpointRetriever)

The internal ServiceEndpointRetriever queries the service registries and feeds the results back to the ComputingServiceRetriever through this method, so the ComputingServiceRetriever can recursively query the found resources.

Parameters
[in]servicean Endpoint refering to a service to query

Implements Arc::EntityConsumer< Endpoint >.

◆ getAllStatuses()

EndpointStatusMap Arc::ComputingServiceRetriever::getAllStatuses ( ) const
inline

Get status of all the queried Endpoint objects.

This method returns a copy of the internal status map, and thus is only a snapshot. If you want the final status map, make sure to invoke the ComputingServiceRetriever::wait method before this one.

Returns
a map with Endpoint objects as keys and status objects as values.

◆ GetExecutionTargets()

void Arc::ComputingServiceRetriever::GetExecutionTargets ( std::list< ExecutionTarget > &  etList)
inline

Convenience method to generate ExectionTarget objects from the resulted ComputingServiceType objects.

Calls the class method ExectuonTarget::GetExecutionTargets with the list of retrieved ComputerServiceType objects.

Parameters
[out]etListthe generated ExecutionTargets will be put into this list

◆ removeConsumer()

void Arc::ComputingServiceRetriever::removeConsumer ( const EntityConsumer< ComputingServiceType > &  removeConsumer_consumer)
inline

Remove a previously added consumer from this ComputingServiceRetriever.

The removed consumer will not get any more result objects

Parameters
[in]cthe consumer to be removed

◆ wait()

void Arc::ComputingServiceRetriever::wait ( void  )
inline

Waits for all the results to arrive.

This method call will only return when all the results have arrived..


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