hpx/components/basename_registration.hpp#

Defined in header hpx/components/basename_registration.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx

Functions

template<typename Client>
std::vector<Client> find_all_from_basename(std::string base_name, std::size_t num_ids)#

Return all registered clients from all localities from the given base name.

This function locates all ids which were registered with the given base name. It returns a list of futures representing those ids.

Return all registered ids from all localities from the given base name.

This function locates all ids which were registered with the given base name. It returns a list of futures representing those ids.

Note

The futures embedded in the returned client objects will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Note

The futures will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Template Parameters

Client – The client type to return

Parameters
  • base_name – [in] The base name for which to retrieve the registered ids.

  • num_ids – [in] The number of registered ids to expect.

  • base_name – [in] The base name for which to retrieve the registered ids.

  • num_ids – [in] The number of registered ids to expect.

Returns

A list of futures representing the ids which were registered using the given base name.

Returns

A list of futures representing the ids which were registered using the given base name.

template<typename Client>
std::vector<Client> find_from_basename(std::string base_name, std::vector<std::size_t> const &ids)#

Return registered clients from the given base name and sequence numbers.

This function locates the ids which were registered with the given base name and the given sequence numbers. It returns a list of futures representing those ids.

Return registered ids from the given base name and sequence numbers.

This function locates the ids which were registered with the given base name and the given sequence numbers. It returns a list of futures representing those ids.

Note

The futures embedded in the returned client objects will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Note

The futures will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Template Parameters

Client – The client type to return

Parameters
  • base_name – [in] The base name for which to retrieve the registered ids.

  • ids – [in] The sequence numbers of the registered ids.

  • base_name – [in] The base name for which to retrieve the registered ids.

  • ids – [in] The sequence numbers of the registered ids.

Returns

A list of futures representing the ids which were registered using the given base name and sequence numbers.

Returns

A list of futures representing the ids which were registered using the given base name and sequence numbers.

template<typename Client>
Client find_from_basename(std::string base_name, std::size_t sequence_nr)#

Return registered id from the given base name and sequence number.

This function locates the id which was registered with the given base name and the given sequence number. It returns a future representing those id.

This function locates the id which was registered with the given base name and the given sequence number. It returns a future representing those id.

Note

The future embedded in the returned client object will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Note

The future will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Template Parameters

Client – The client type to return

Parameters
  • base_name – [in] The base name for which to retrieve the registered ids.

  • sequence_nr – [in] The sequence number of the registered id.

  • base_name – [in] The base name for which to retrieve the registered ids.

  • sequence_nr – [in] The sequence number of the registered id.

Returns

A representing the id which was registered using the given base name and sequence numbers.

Returns

A representing the id which was registered using the given base name and sequence numbers.

template<typename Client, typename Stub, typename Data>
hpx::future<bool> register_with_basename(std::string base_name, components::client_base<Client, Stub, Data> &client, std::size_t sequence_nr)#

Register the id wrapped in the given client using the given base name.

The function registers the object the given client refers to using the provided base name.

Note

The operation will fail if the given sequence number is not unique.

Template Parameters

Client – The client type to register

Parameters
  • base_name – [in] The base name for which to retrieve the registered ids.

  • client – [in] The client which should be registered using the given base name.

  • sequence_nr – [in, optional] The sequential number to use for the registration of the id. This number has to be unique system-wide for each registration using the same base name. The default is the current locality identifier. Also, the sequence numbers have to be consecutive starting from zero.

Returns

A future representing the result of the registration operation itself.

template<typename Client>
Client unregister_with_basename(std::string base_name, std::size_t sequence_nr = ~static_cast<std::size_t>(0))#

Unregister the given id using the given base name.

Unregister the given base name.

The function unregisters the given ids using the provided base name.

The function unregisters the given ids using the provided base name.

Template Parameters

Client – The client type to return

Parameters
  • base_name – [in] The base name for which to retrieve the registered ids.

  • sequence_nr – [in, optional] The sequential number to use for the un-registration. This number has to be the same as has been used with register_with_basename before.

  • base_name – [in] The base name for which to retrieve the registered ids.

  • sequence_nr – [in, optional] The sequential number to use for the un-registration. This number has to be the same as has been used with register_with_basename before.

Returns

A future representing the result of the un-registration operation itself.

Returns

A future representing the result of the un-registration operation itself.