Implements the base class for distributed objects. More...
Public Member Functions | |
| p_object (const unsigned int flags=0) | |
| Constructs a new p_object. More... | |
| p_object (p_object const &other) | |
| Copy constructs a new p_object in the gang of the caller. More... | |
| p_object (p_object &&other) | |
| Move constructs a new p_object in the gang of the caller. More... | |
| p_object & | operator= (p_object const &other) noexcept |
Assigns other to *this. More... | |
| p_object & | operator= (p_object &&other) noexcept |
Move assigns other to *this. More... | |
| runtime::location_md const & | get_location_md (void) const noexcept |
| Returns the location metadata of the location this object registered in. | |
| runtime::location_md & | get_location_md (void) noexcept |
| Returns the location metadata of the location this object registered in. noexcept More... | |
Distributed Object Management | |
| rmi_handle::const_reference const & | get_rmi_handle (void) const noexcept |
| Returns the associated rmi_handle. | |
| rmi_handle::reference const & | get_rmi_handle (void) noexcept |
| Returns the associated rmi_handle. | |
| size_type | get_location_id (void) const noexcept |
| Returns the location id of the local sub-object. | |
| size_type | get_num_locations (void) const noexcept |
| Returns the number of locations of the gang of this p_object. | |
| void | advance_epoch (void) |
| Advances the epoch of the object. More... | |
| void | unlock (void) |
Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs. More... | |
| void | lock (void) |
Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs. More... | |
| bool | try_lock (void) |
| Attempt to maintain atomicity with respect to incoming RMIs. More... | |
Public Types | |
| using | size_type = rmi_handle::size_type |
Protected Member Functions | |
| virtual | ~p_object (void)=default |
| Unregisters and destroys this p_object. | |
Implements the base class for distributed objects.
A user class can extend from p_object to have automatic registration and unregistration, as well as access to information describing the location it was created in without the need to call the stand-alone functions.
|
explicit |
Constructs a new p_object.
| flags | Registration flags. |
| stapl::p_object::p_object | ( | p_object const & | other | ) |
Copy constructs a new p_object in the gang of the caller.
other. | stapl::p_object::p_object | ( | p_object && | other | ) |
Move constructs a new p_object in the gang of the caller.
other. Assigns other to *this.
*this does not change. Move assigns other to *this.
*this does not change.
|
noexcept |
Returns the location metadata of the location this object registered in. noexcept
noexcept
| void stapl::p_object::advance_epoch | ( | void | ) |
Advances the epoch of the object.
Advancing the epoch will flush any pending RMIs. It will also increase the epoch of the current gang if the object is not a named object.
| void stapl::p_object::unlock | ( | void | ) |
Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs.
Mutates counter in the associated runqueue.
| void stapl::p_object::lock | ( | void | ) |
Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs.
Mutates counter in the associated runqueue.
| bool stapl::p_object::try_lock | ( | void | ) |
Attempt to maintain atomicity with respect to incoming RMIs.
Mutates counter in the associated runqueue.
true if the lock was able to be acquired. false if it is already locked.
1.8.13