ARC SDK
|
Represents an endpoint of a service with a given interface type and capabilities. More...
#include <arc/compute/Endpoint.h>
Public Types | |
enum | CapabilityEnum { REGISTRY, COMPUTINGINFO, JOBLIST, JOBSUBMIT, JOBCREATION, JOBMANAGEMENT, UNSPECIFIED } |
Values for classifying capabilities of services. More... | |
Public Member Functions | |
Endpoint (const std::string &URLString="", const std::set< std::string > &Capability=std::set< std::string >(), const std::string &InterfaceName="") | |
Create a new Endpoint with a list of capability strings. More... | |
Endpoint (const std::string &URLString, const Endpoint::CapabilityEnum cap, const std::string &InterfaceName="") | |
Create a new Endpoint with a single capability specified by the CapabilityEnum. More... | |
Endpoint (const ExecutionTarget &e, const std::string &rsi="") | |
Create new Endpoint from ExecutionTarget object. More... | |
Endpoint (const ComputingEndpointAttributes &cea, const std::string &rsi="") | |
Create new Endpoint from ComputingEndpointAttributes object. More... | |
Endpoint (const ConfigEndpoint &endpoint) | |
Create a new Endpoint from a ConfigEndpoint. More... | |
bool | HasCapability (Endpoint::CapabilityEnum cap) const |
Check for capability. More... | |
bool | HasCapability (const std::string &cap) const |
Check for capability. More... | |
std::string | str () const |
Get string representation of this object. More... | |
std::string | getServiceName () const |
Get name of service from URLString attribute. More... | |
bool | operator< (const Endpoint &other) const |
Key comparison method. More... | |
Endpoint & | operator= (const ConfigEndpoint &e) |
Set from a ConfigEndpoint object. More... | |
Static Public Member Functions | |
static std::string | GetStringForCapability (Endpoint::CapabilityEnum cap) |
Get string representation of CapabilityEnum. More... | |
static bool | ServiceIDCompare (const Endpoint &a, const Endpoint &b) |
Key comparison function for comparing Endpoint objects. More... | |
static std::pair < EndpointStatusMap::const_iterator, EndpointStatusMap::const_iterator > | getServiceEndpoints (const Endpoint &, const EndpointStatusMap &) |
Get bounds in EndpointStatusMap corresponding to Endpoint. More... | |
Data Fields | |
std::string | URLString |
The string representation of the URL of the Endpoint. More... | |
std::string | InterfaceName |
The type of the interface (GLUE2 InterfaceName) More... | |
std::string | HealthState |
GLUE2 HealthState More... | |
std::string | HealthStateInfo |
GLUE2 HealthStateInfo More... | |
std::string | QualityLevel |
GLUE2 QualityLevel More... | |
std::set< std::string > | Capability |
Set of GLUE2 Capability strings. More... | |
std::string | RequestedSubmissionInterfaceName |
A GLUE2 InterfaceName requesting an InterfaceName used for job submission. More... | |
std::string | ServiceID |
ID of service this Endpoint belongs to. More... | |
Represents an endpoint of a service with a given interface type and capabilities.
This class similar in structure to the Endpoint entity in the GLUE2 specification. The type of the interface is described by a string called InterfaceName (from the GLUE2 specification). An Endpoint object must have a URL, and it is quite useless without capabilities (the system has to know if an Endpoint is a service registry or a computing element), but the InterfaceName is optional.
The Endpoint object also contains information about the health state and quality level of the endpoint, and optionally the requested submission interface name, which will be used later if a job will be submitted to a computing element related to this endpoint.
Values for classifying capabilities of services.
|
inline |
|
inline |
Create a new Endpoint with a single capability specified by the CapabilityEnum.
[in] | URLString | is a string representing the URL of the endpoint |
[in] | cap | is a CapabilityEnum specifying the single capability of the endpoint |
[in] | InterfaceName | is an optional string specifying the type of the interface |
Arc::Endpoint::Endpoint | ( | const ExecutionTarget & | e, |
const std::string & | rsi = "" |
||
) |
Create new Endpoint from ExecutionTarget object.
e | ExecutionTarget object to create new Endpoint from. |
rsi | string specifying the requested submission interface if any. Default value is the empty string. |
Arc::Endpoint::Endpoint | ( | const ComputingEndpointAttributes & | cea, |
const std::string & | rsi = "" |
||
) |
Create new Endpoint from ComputingEndpointAttributes object.
cea | ComputingEndpointAttributes object to create new Endpoint from. |
rsi | string specifying the requested submission interface if any. Default value is the empty string. |
|
inline |
Create a new Endpoint from a ConfigEndpoint.
The ConfigEndpoint::URLString, ConfigEndpoint::InterfaceName and the ConfigEndpoint::RequestedSubmissionInterfaceName attributes will be copied from the ConfigEndpoint, and if the type of the ConfigEndpoint is REGISTRY or COMPUTINGINFO, the given capability will be added to the new Endpoint object.
[in] | endpoint | is the ConfigEndpoint object which will be converted to an Endpoint |
|
static |
Get bounds in EndpointStatusMap corresponding to Endpoint.
[in] | endpoint | An Endpoint object for which the bounds of equivalent Endpoint objects in the EndpointStatusMap should be found. |
[in] | statusMap | See description above. |
std::string Arc::Endpoint::getServiceName | ( | ) | const |
|
inlinestatic |
Get string representation of CapabilityEnum.
bool Arc::Endpoint::HasCapability | ( | Endpoint::CapabilityEnum | cap | ) | const |
Check for capability.
Checks if the Endpoint has the given capability specified by a CapabilityEnum value.
[in] | cap | is the specified CapabilityEnum |
bool Arc::Endpoint::HasCapability | ( | const std::string & | cap | ) | const |
bool Arc::Endpoint::operator< | ( | const Endpoint & | other | ) | const |
Endpoint& Arc::Endpoint::operator= | ( | const ConfigEndpoint & | e | ) |
Set from a ConfigEndpoint object.
*this
is returned. Key comparison function for comparing Endpoint objects.
Compare endpoints by ServiceID, URLString and InterfaceName in that order. The attributes are compared lexicographically.
std::string Arc::Endpoint::str | ( | ) | const |
Get string representation of this object.
<URLString> (<InterfaceName>[, capabilities: <Capabilities space separated>])where if InterfaceName is empty, "<empty InterfaceName>" is used.
std::set<std::string> Arc::Endpoint::Capability |
Set of GLUE2 Capability strings.
std::string Arc::Endpoint::HealthState |
GLUE2 HealthState
std::string Arc::Endpoint::HealthStateInfo |
GLUE2 HealthStateInfo
std::string Arc::Endpoint::InterfaceName |
The type of the interface (GLUE2 InterfaceName)
std::string Arc::Endpoint::QualityLevel |
GLUE2 QualityLevel
std::string Arc::Endpoint::RequestedSubmissionInterfaceName |
A GLUE2 InterfaceName requesting an InterfaceName used for job submission.
If a user specifies an InterfaceName for submitting jobs, that information will be stored here and will be used when collecting information about the computing element. Only those job submission interfaces will be considered which has this requested InterfaceName.
std::string Arc::Endpoint::ServiceID |
ID of service this Endpoint belongs to.
std::string Arc::Endpoint::URLString |