Pick one of a set of peers to be "active". More...
#include <yarp/os/Election.h>
Public Member Functions | |
ElectionOf ()=default | |
virtual | ~ElectionOf ()=default |
PR * | add (const std::string &key, typename PR::peer_type *entity) |
void | remove (const std::string &key, typename PR::peer_type *entity) |
PR::peer_type * | getElect (const std::string &key) |
PR * | getRecord (const std::string &key) |
long | getEventCount () |
void | lock () |
void | unlock () |
Pick one of a set of peers to be "active".
Used for situations where a manager is required for some resource used by several peers, but it doesn't matter which peer plays that role.
PR should be a subclass of PeerRecord.
Definition at line 63 of file Election.h.
|
default |
|
virtualdefault |
|
inline |
Definition at line 91 of file Election.h.
|
inline |
Definition at line 112 of file Election.h.
|
inline |
Definition at line 131 of file Election.h.
|
inline |
Definition at line 123 of file Election.h.
|
inline |
Definition at line 136 of file Election.h.
|
inline |
Definition at line 102 of file Election.h.
|
inline |
Definition at line 141 of file Election.h.