agas

The contents of this module can be included with the header hpx/modules/agas.hpp. These headers may be used by user-code but are not guaranteed stable (neither header location nor contents). You are using these at your own risk. If you wish to use non-public functionality from a module we strongly suggest only including the module header hpx/modules/agas.hpp, not the particular header in which the functionality you would like to use is defined. See Public API for a list of names that are part of the public HPX API.

namespace hpx
namespace agas
struct addressing_service

Public Types

using component_id_type = components::component_type
using iterate_names_return_type = std::map<std::string, naming::id_type>
using iterate_types_function_type = hpx::util::function<void(std::string const&, components::component_type)>
using mutex_type = hpx::lcos::local::spinlock
using gva_cache_type = hpx::util::cache::lru_cache<gva_cache_key, gva, hpx::util::cache::statistics::local_full_statistics>
using migrated_objects_table_type = std::set<naming::gid_type>
using refcnt_requests_type = std::map<naming::gid_type, std::int64_t>
using resolved_localities_type = std::map<naming::gid_type, parcelset::endpoints_type>

Public Functions

HPX_NON_COPYABLE(addressing_service)
addressing_service(util::runtime_configuration const &ini_)
~addressing_service()
void bootstrap(parcelset::endpoints_type const &endpoints, util::runtime_configuration &rtcfg)
void initialize(std::uint64_t rts_lva)
void adjust_local_cache_size(std::size_t)

Adjust the size of the local AGAS Address resolution cache.

state get_status() const
void set_status(state new_state)
naming::gid_type const &get_local_locality(error_code& = throws) const
void set_local_locality(naming::gid_type const &g)
void register_console(parcelset::endpoints_type const &eps)
bool is_bootstrap() const
bool is_console() const

Returns whether this addressing_service represents the console locality.

bool is_connecting() const

Returns whether this addressing_service is connecting to a running application.

bool resolve_locally_known_addresses(naming::gid_type const &id, naming::address &addr)
void register_server_instances()
void garbage_collect_non_blocking(error_code &ec = throws)
void garbage_collect(error_code &ec = throws)
std::int64_t synchronize_with_async_incref(hpx::future<std::int64_t> fut, naming::id_type const &id, std::int64_t compensated_credit)
server::primary_namespace &get_local_primary_namespace_service()
naming::address::address_type get_primary_ns_lva() const
naming::address::address_type get_symbol_ns_lva() const
server::component_namespace *get_local_component_namespace_service()
server::locality_namespace *get_local_locality_namespace_service()
server::symbol_namespace &get_local_symbol_namespace_service()
std::uint64_t get_cache_entries(bool)
std::uint64_t get_cache_hits(bool)
std::uint64_t get_cache_misses(bool)
std::uint64_t get_cache_evictions(bool)
std::uint64_t get_cache_insertions(bool)
std::uint64_t get_cache_get_entry_count(bool reset)
std::uint64_t get_cache_insertion_entry_count(bool reset)
std::uint64_t get_cache_update_entry_count(bool reset)
std::uint64_t get_cache_erase_entry_count(bool reset)
std::uint64_t get_cache_get_entry_time(bool reset)
std::uint64_t get_cache_insertion_entry_time(bool reset)
std::uint64_t get_cache_update_entry_time(bool reset)
std::uint64_t get_cache_erase_entry_time(bool reset)
bool register_locality(parcelset::endpoints_type const &endpoints, naming::gid_type &prefix, std::uint32_t num_threads, error_code &ec = throws)

Add a locality to the runtime.

parcelset::endpoints_type const &resolve_locality(naming::gid_type const &gid, error_code &ec = throws)

Resolve a locality to its prefix.

Return

Returns an empty vector if the locality is not registered.

bool has_resolved_locality(naming::gid_type const &gid)
bool unregister_locality(naming::gid_type const &gid, error_code &ec = throws)

Remove a locality from the runtime.

void remove_resolved_locality(naming::gid_type const &gid)

remove given locality from locality cache

bool get_console_locality(naming::gid_type &locality, error_code &ec = throws)

Get locality locality_id of the console locality.

Return

This function returns true if a console locality_id exists and returns false otherwise.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • locality_id: [out] The locality_id value uniquely identifying the console locality. This is valid only, if the return value of this function is true.

  • try_cache: [in] If this is set to true the console is first tried to be found in the local cache. Otherwise this function will always query AGAS, even if the console locality_id is already known locally.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

bool get_localities(std::vector<naming::gid_type> &locality_ids, components::component_type type, error_code &ec = throws)

Query for the locality_ids of all known localities.

This function returns the locality_ids of all localities known to the AGAS server or all localities having a registered factory for a given component type.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • locality_ids: [out] The vector will contain the prefixes of all localities registered with the AGAS server. The returned vector holds the prefixes representing the runtime_support components of these localities.

  • type: [in] The component type will be used to determine the set of prefixes having a registered factory for this component. The default value for this parameter is components::component_invalid, which will return prefixes of all localities.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

bool get_localities(std::vector<naming::gid_type> &locality_ids, error_code &ec = throws)
lcos::future<std::uint32_t> get_num_localities_async(components::component_type type = components::component_invalid) const

Query for the number of all known localities.

This function returns the number of localities known to the AGAS server or the number of localities having a registered factory for a given component type.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • type: [in] The component type will be used to determine the set of prefixes having a registered factory for this component. The default value for this parameter is components::component_invalid, which will return prefixes of all localities.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

std::uint32_t get_num_localities(components::component_type type, error_code &ec = throws) const
std::uint32_t get_num_localities(error_code &ec = throws) const
lcos::future<std::uint32_t> get_num_overall_threads_async() const
std::uint32_t get_num_overall_threads(error_code &ec = throws) const
lcos::future<std::vector<std::uint32_t>> get_num_threads_async() const
std::vector<std::uint32_t> get_num_threads(error_code &ec = throws) const
components::component_type get_component_id(std::string const &name, error_code &ec = throws)

Return a unique id usable as a component type.

This function returns the component type id associated with the given component name. If this is the first request for this component name a new unique id will be created.

Return

The function returns the currently associated component type. Any error results in an exception thrown from this function.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • name: [in] The component name (string) to get the component type for.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

void iterate_types(iterate_types_function_type const &f, error_code &ec = throws)
std::string get_component_type_name(components::component_type id, error_code &ec = throws)
components::component_type register_factory(naming::gid_type const &locality_id, std::string const &name, error_code &ec = throws)

Register a factory for a specific component type.

This function allows to register a component factory for a given locality and component type.

Return

The function returns the currently associated component type. Any error results in an exception thrown from this function. The returned component type is the same as if the function get_component_id was called using the same component name.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • locality_id: [in] The locality value uniquely identifying the given locality the factory needs to be registered for.

  • name: [in] The component name (string) to register a factory for the given component type for.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

components::component_type register_factory(std::uint32_t locality_id, std::string const &name, error_code &ec = throws)
bool get_id_range(std::uint64_t count, naming::gid_type &lower_bound, naming::gid_type &upper_bound, error_code &ec = throws)

Get unique range of freely assignable global ids.

Every locality needs to be able to assign global ids to different components without having to consult the AGAS server for every id to generate. This function can be called to preallocate a range of ids usable for this purpose.

Return

This function returns true if a new range has been generated (it has been called for the first time for the given locality) and returns false if this locality already got a range assigned in an earlier call. Any error results in an exception thrown from this function.

Note

This function assigns a range of global ids usable by the given locality for newly created components. Any of the returned global ids still has to be bound to a local address, either by calling bind or bind_range.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • l: [in] The locality the locality id needs to be generated for. Repeating calls using the same locality results in identical locality_id values.

  • count: [in] The number of global ids to be generated.

  • lower_bound: [out] The lower bound of the assigned id range. The returned value can be used as the first id to assign. This is valid only, if the return value of this function is true.

  • upper_bound: [out] The upper bound of the assigned id range. The returned value can be used as the last id to assign. This is valid only, if the return value of this function is true.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

bool bind_local(naming::gid_type const &id, naming::address const &addr, error_code &ec = throws)

Bind a global address to a local address.

Every element in the HPX namespace has a unique global address (global id). This global address has to be associated with a concrete local address to be able to address an instance of a component using its global address.

Return

This function returns true, if this global id got associated with an local address. It returns false otherwise.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Note

Binding a gid to a local address sets its global reference count to one.

Parameters
  • id: [in] The global address which has to be bound to the local address.

  • addr: [in] The local address to be bound to the global address.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

hpx::future<bool> bind_async(naming::gid_type const &id, naming::address const &addr, std::uint32_t locality_id)
hpx::future<bool> bind_async(naming::gid_type const &id, naming::address const &addr, naming::gid_type const &locality)
bool bind_range_local(naming::gid_type const &lower_id, std::uint64_t count, naming::address const &baseaddr, std::uint64_t offset, error_code &ec = throws)

Bind unique range of global ids to given base address.

Every locality needs to be able to bind global ids to different components without having to consult the AGAS server for every id to bind. This function can be called to bind a range of consecutive global ids to a range of consecutive local addresses (separated by a given offset).

Return

This function returns true, if the given range was successfully bound. It returns false otherwise.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Note

Binding a gid to a local address sets its global reference count to one.

Parameters
  • lower_id: [in] The lower bound of the assigned id range. The value can be used as the first id to assign.

  • count: [in] The number of consecutive global ids to bind starting at lower_id.

  • baseaddr: [in] The local address to bind to the global id given by lower_id. This is the base address for all additional local addresses to bind to the remaining global ids.

  • offset: [in] The offset to use to calculate the local addresses to be bound to the range of global ids.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

hpx::future<bool> bind_range_async(naming::gid_type const &lower_id, std::uint64_t count, naming::address const &baseaddr, std::uint64_t offset, naming::gid_type const &locality)
hpx::future<bool> bind_range_async(naming::gid_type const &lower_id, std::uint64_t count, naming::address const &baseaddr, std::uint64_t offset, std::uint32_t locality_id)
bool unbind_local(naming::gid_type const &id, error_code &ec = throws)

Unbind a global address.

Remove the association of the given global address with any local address, which was bound to this global address. Additionally it returns the local address which was bound at the time of this call.

Return

The function returns true if the association has been removed, and it returns false if no association existed. Any error results in an exception thrown from this function.

Note

You can unbind only global ids bound using the function bind. Do not use this function to unbind any of the global ids bound using bind_range.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Note

This function will raise an error if the global reference count of the given gid is not zero! TODO: confirm that this happens.

Parameters
  • id: [in] The global address (id) for which the association has to be removed.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

bool unbind_local(naming::gid_type const &id, naming::address &addr, error_code &ec = throws)

Unbind a global address.

Remove the association of the given global address with any local address, which was bound to this global address. Additionally it returns the local address which was bound at the time of this call.

Return

The function returns true if the association has been removed, and it returns false if no association existed. Any error results in an exception thrown from this function.

Note

You can unbind only global ids bound using the function bind. Do not use this function to unbind any of the global ids bound using bind_range.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Note

This function will raise an error if the global reference count of the given gid is not zero! TODO: confirm that this happens.

Parameters
  • id: [in] The global address (id) for which the association has to be removed.

  • addr: [out] The local address which was associated with the given global address (id). This is valid only if the return value of this function is true.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

bool unbind_range_local(naming::gid_type const &lower_id, std::uint64_t count, error_code &ec = throws)

Unbind the given range of global ids.

Return

This function returns true if a new range has been generated (it has been called for the first time for the given locality) and returns false if this locality already got a range assigned in an earlier call. Any error results in an exception thrown from this function.

Note

You can unbind only global ids bound using the function bind_range. Do not use this function to unbind any of the global ids bound using bind.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Note

This function will raise an error if the global reference count of the given gid is not zero! TODO: confirm that this happens.

Parameters
  • lower_id: [in] The lower bound of the assigned id range. The value must the first id of the range as specified to the corresponding call to bind_range.

  • count: [in] The number of consecutive global ids to unbind starting at lower_id. This number must be identical to the number of global ids bound by the corresponding call to bind_range

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

bool unbind_range_local(naming::gid_type const &lower_id, std::uint64_t count, naming::address &addr, error_code &ec = throws)

Unbind the given range of global ids.

Return

This function returns true if a new range has been generated (it has been called for the first time for the given locality) and returns false if this locality already got a range assigned in an earlier call.

Note

You can unbind only global ids bound using the function bind_range. Do not use this function to unbind any of the global ids bound using bind.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Note

This function will raise an error if the global reference count of the given gid is not zero!

Parameters
  • lower_id: [in] The lower bound of the assigned id range. The value must the first id of the range as specified to the corresponding call to bind_range.

  • count: [in] The number of consecutive global ids to unbind starting at lower_id. This number must be identical to the number of global ids bound by the corresponding call to bind_range

  • addr: [out] The local address which was associated with the given global address (id). This is valid only if the return value of this function is true.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

hpx::future<naming::address> unbind_range_async(naming::gid_type const &lower_id, std::uint64_t count = 1)
bool is_local_address_cached(naming::gid_type const &id, error_code &ec = throws)

Test whether the given address refers to a local object.

This function will test whether the given address refers to an object living on the locality of the caller.

Return

This function returns true if the passed address refers to an object which lives on the locality of the caller.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • addr: [in] The address to test.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

bool is_local_address_cached(naming::gid_type const &id, naming::address &addr, error_code &ec = throws)
bool is_local_lva_encoded_address(std::uint64_t msb)
bool resolve_local(naming::gid_type const &id, naming::address &addr, error_code &ec = throws)

Resolve a given global address (id) to its associated local address.

This function returns the local address which is currently associated with the given global address (id).

Return

This function returns true if the global address has been resolved successfully (there exists an association to a local address) and the associated local address has been returned. The function returns false if no association exists for the given global address. Any error results in an exception thrown from this function.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • id: [in] The global address (id) for which the associated local address should be returned.

  • addr: [out] The local address which currently is associated with the given global address (id), this is valid only if the return value of this function is true.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

bool resolve_local(naming::id_type const &id, naming::address &addr, error_code &ec = throws)
naming::address resolve_local(naming::gid_type const &id, error_code &ec = throws)
naming::address resolve_local(naming::id_type const &id, error_code &ec = throws)
hpx::future<naming::address> resolve_async(naming::gid_type const &id)
hpx::future<naming::address> resolve_async(naming::id_type const &id)
hpx::future<naming::id_type> get_colocation_id_async(naming::id_type const &id)
bool resolve_full_local(naming::gid_type const &id, naming::address &addr, error_code &ec = throws)
bool resolve_full_local(naming::id_type const &id, naming::address &addr, error_code &ec = throws)
naming::address resolve_full_local(naming::gid_type const &id, error_code &ec = throws)
naming::address resolve_full_local(naming::id_type const &id, error_code &ec = throws)
hpx::future<naming::address> resolve_full_async(naming::gid_type const &id)
hpx::future<naming::address> resolve_full_async(naming::id_type const &id)
bool resolve_cached(naming::gid_type const &id, naming::address &addr, error_code &ec = throws)
bool resolve_cached(naming::id_type const &id, naming::address &addr, error_code &ec = throws)
bool resolve_local(naming::gid_type const *gids, naming::address *addrs, std::size_t size, boost::dynamic_bitset<> &locals, error_code &ec = throws)
bool resolve_full_local(naming::gid_type const *gids, naming::address *addrs, std::size_t size, boost::dynamic_bitset<> &locals, error_code &ec = throws)
bool resolve_cached(naming::gid_type const *gids, naming::address *addrs, std::size_t size, boost::dynamic_bitset<> &locals, error_code &ec = throws)
lcos::future<std::int64_t> incref_async(naming::gid_type const &gid, std::int64_t credits = 1, naming::id_type const &keep_alive = naming::invalid_id)

Increment the global reference count for the given id.

Return

Whether the operation was successful.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • id: [in] The global address (id) for which the global reference count has to be incremented.

  • credits: [in] The number of reference counts to add for the given id.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

std::int64_t incref(naming::gid_type const &gid, std::int64_t credits = 1, error_code &ec = throws)
void decref(naming::gid_type const &id, std::int64_t credits = 1, error_code &ec = throws)

Decrement the global reference count for the given id.

Return

The global reference count after the decrement.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • id: [in] The global address (id) for which the global reference count has to be decremented.

  • t: [out] If this was the last outstanding global reference for the given gid (the return value of this function is zero), t will be set to the component type of the corresponding element. Otherwise t will not be modified.

  • credits: [in] The number of reference counts to add for the given id.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

hpx::future<iterate_names_return_type> iterate_ids(std::string const &pattern)

Invoke the supplied hpx::function for every registered global name.

This function iterates over all registered global ids and returns every found entry matching the given name pattern. Any error results in an exception thrown (or reported) from this function.

Parameters
  • pattern: [in] pattern (poosibly using wildcards) to match all existing entries against

bool register_name(std::string const &name, naming::gid_type const &id, error_code &ec = throws)

Register a global name with a global address (id)

This function registers an association between a global name (string) and a global address (id) usable with one of the functions above (bind, unbind, and resolve).

Return

The function returns true if the global name was registered. It returns false if the global name is not registered.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • name: [in] The global name (string) to be associated with the global address.

  • id: [in] The global address (id) to be associated with the global address.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

lcos::future<bool> register_name_async(std::string const &name, naming::id_type const &id)
bool register_name(std::string const &name, naming::id_type const &id, error_code &ec = throws)
lcos::future<naming::id_type> unregister_name_async(std::string const &name)

Unregister a global name (release any existing association)

This function releases any existing association of the given global name with a global address (id).

Return

The function returns true if an association of this global name has been released, and it returns false, if no association existed. Any error results in an exception thrown from this function.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters
  • name: [in] The global name (string) for which any association with a global address (id) has to be released.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

naming::id_type unregister_name(std::string const &name, error_code &ec = throws)
lcos::future<naming::id_type> resolve_name_async(std::string const &name)

Query for the global address associated with a given global name.

This function returns the global address associated with the given global name.

This function returns true if it returned global address (id), which is currently associated with the given global name, and it returns false, if currently there is no association for this global name. Any error results in an exception thrown from this function.

Return

[out] The id currently associated with the given global name (valid only if the return value is true).

Parameters
  • name: [in] The global name (string) for which the currently associated global address has to be retrieved.

  • ec: [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

Note

As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

naming::id_type resolve_name(std::string const &name, error_code &ec = throws)
future<hpx::id_type> on_symbol_namespace_event(std::string const &name, bool call_for_past_events = false)

Install a listener for a given symbol namespace event.

This function installs a listener for a given symbol namespace event. It returns a future which becomes ready as a result of the listener being triggered.

Return

A future instance encapsulating the global id which is causing the registered listener to be triggered.

Note

The only event type which is currently supported is symbol_ns_bind, i.e. the listener is triggered whenever a global id is registered with the given name.

Parameters
  • name: [in] The global name (string) for which the given event should be triggered.

  • evt: [in] The event for which a listener should be installed.

  • call_for_past_events: [in, optional] Trigger the listener even if the given event has already happened in the past. The default for this parameter is false.

void update_cache_entry(naming::gid_type const &gid, gva const &gva, error_code &ec = throws)

Warning

This function is for internal use only. It is dangerous and may break your code if you use it.

void update_cache_entry(naming::gid_type const &gid, naming::address const &addr, std::uint64_t count = 0, std::uint64_t offset = 0, error_code &ec = throws)

Warning

This function is for internal use only. It is dangerous and may break your code if you use it.

bool get_cache_entry(naming::gid_type const &gid, gva &gva, naming::gid_type &idbase, error_code &ec = throws)

Warning

This function is for internal use only. It is dangerous and may break your code if you use it.

void remove_cache_entry(naming::gid_type const &id, error_code &ec = throws)

Warning

This function is for internal use only. It is dangerous and may break your code if you use it.

void clear_cache(error_code &ec = throws)

Warning

This function is for internal use only. It is dangerous and may break your code if you use it.

void start_shutdown(error_code &ec = throws)
hpx::future<std::pair<naming::id_type, naming::address>> begin_migration(naming::id_type const &id)

start/stop migration of an object

Return

Current locality and address of the object to migrate

bool end_migration(naming::id_type const &id)
std::pair<bool, components::pinned_ptr> was_object_migrated(naming::gid_type const &gid, util::unique_function_nonser<components::pinned_ptr()> &&f)

Maintain list of migrated objects.

hpx::future<void> mark_as_migrated(naming::gid_type const &gid, util::unique_function_nonser<std::pair<bool, hpx::future<void>>()> &&fbool expect_to_be_marked_as_migrating, )

Mark the given object as being migrated (if the object is unpinned). Delay migration until the object is unpinned otherwise.

void unmark_as_migrated(naming::gid_type const &gid)

Remove the given object from the table of migrated objects.

void pre_cache_endpoints(std::vector<parcelset::endpoints_type> const&)

Public Members

mutex_type gva_cache_mtx_
std::shared_ptr<gva_cache_type> gva_cache_
mutex_type migrated_objects_mtx_
migrated_objects_table_type migrated_objects_table_
mutex_type console_cache_mtx_
std::uint32_t console_cache_
const std::size_t max_refcnt_requests_
mutex_type refcnt_requests_mtx_
std::size_t refcnt_requests_count_
bool enable_refcnt_caching_
std::shared_ptr<refcnt_requests_type> refcnt_requests_
const service_mode service_type
const runtime_mode runtime_type
const bool caching_
const bool range_caching_
const threads::thread_priority action_priority_
std::uint64_t rts_lva_
std::unique_ptr<component_namespace> component_ns_
std::unique_ptr<locality_namespace> locality_ns_
symbol_namespace symbol_ns_
primary_namespace primary_ns_
std::atomic<hpx::state> state_
naming::gid_type locality_
mutex_type resolved_localities_mtx_
resolved_localities_type resolved_localities_

Protected Functions

void launch_bootstrap(parcelset::endpoints_type const &endpoints, util::runtime_configuration &rtcfg)
naming::address resolve_full_postproc(naming::gid_type const &id, future<primary_namespace::resolved_type> f)
bool bind_postproc(naming::gid_type const &id, gva const &g, future<bool> f)
bool was_object_migrated_locked(naming::gid_type const &id)

Maintain list of migrated objects.

Private Functions

void send_refcnt_requests(std::unique_lock<mutex_type> &l, error_code &ec = throws)

Assumes that refcnt_requests_mtx_ is locked.

void send_refcnt_requests_non_blocking(std::unique_lock<mutex_type> &l, error_code &ec)

Assumes that refcnt_requests_mtx_ is locked.

std::vector<hpx::future<std::vector<std::int64_t>>> send_refcnt_requests_async(std::unique_lock<mutex_type> &l)

Assumes that refcnt_requests_mtx_ is locked.

void send_refcnt_requests_sync(std::unique_lock<mutex_type> &l, error_code &ec)

Assumes that refcnt_requests_mtx_ is locked.

namespace hpx
namespace naming

Typedefs

using resolver_client = agas::addressing_service

Functions

agas::addressing_service &get_agas_client()
agas::addressing_service *get_agas_client_ptr()
namespace hpx
namespace agas

Functions

bool router_is(state st)