GComm
0.2.3
|
Class implementing EVS protocol. More...
#include <evs_proto.hpp>
Classes | |
class | TimerList |
Public Types | |
enum | State { S_CLOSED, S_JOINING, S_LEAVING, S_GATHER, S_INSTALL, S_OPERATIONAL, S_MAX } |
enum | Timer { T_INACTIVITY, T_RETRANS, T_INSTALL, T_STATS } |
enum | DebugFlags { D_STATE = 1 << 0, D_TIMERS = 1 << 1, D_CONSENSUS = 1 << 2, D_USER_MSGS = 1 << 3, D_DELEGATE_MSGS = 1 << 4, D_GAP_MSGS = 1 << 5, D_JOIN_MSGS = 1 << 6, D_INSTALL_MSGS = 1 << 7, D_LEAVE_MSGS = 1 << 8, D_FOREIGN_MSGS = 1 << 9, D_RETRANS = 1 << 10, D_DELIVERY = 1 << 11 } |
Flags controlling what debug information is logged if debug logging is turned on. More... | |
enum | InfoFlags { I_VIEWS = 1 << 0, I_STATE = 1 << 1, I_STATISTICS = 1 << 2, I_PROFILING = 1 << 3 } |
Flags controlling what info log is printed in logs. More... | |
Public Member Functions | |
Proto (gu::Config &conf, const UUID &my_uuid, SegmentId segment, const gu::URI &uri=gu::URI("evs://"), const size_t mtu=std::numeric_limits< size_t >::max()) | |
const UUID & | uuid () const |
std::string | self_string () const |
State | state () const |
size_t | known_size () const |
bool | is_output_empty () const |
std::string | stats () const |
void | reset_stats () |
bool | is_flow_control (const seqno_t, const seqno_t win) const |
int | send_user (Datagram &, uint8_t, Order, seqno_t, seqno_t, size_t n_aggregated=1) |
size_t | mtu () const |
size_t | aggregate_len () const |
int | send_user (const seqno_t) |
void | complete_user (const seqno_t) |
int | send_delegate (Datagram &) |
void | send_gap (const UUID &, const ViewId &, const Range, bool commit=false) |
const JoinMessage & | create_join () |
void | send_join (bool tval=true) |
void | set_join (const JoinMessage &, const UUID &) |
void | set_leave (const LeaveMessage &, const UUID &) |
void | send_leave (bool handle=true) |
void | send_install () |
void | resend (const UUID &, const Range) |
void | recover (const UUID &, const UUID &, const Range) |
void | retrans_user (const UUID &, const MessageNodeList &) |
void | retrans_leaves (const MessageNodeList &) |
void | set_inactive (const UUID &) |
void | check_inactive () |
void | cleanup_foreign (const InstallMessage &) |
void | cleanup_views () |
void | cleanup_joins () |
size_t | n_operational () const |
void | validate_reg_msg (const UserMessage &) |
void | deliver_finish (const InputMapMsg &) |
void | deliver () |
void | deliver_local (bool trans=false) |
void | deliver_causal (uint8_t user_type, seqno_t seqno, const Datagram &) |
void | validate_trans_msg (const UserMessage &) |
void | deliver_trans () |
void | deliver_reg_view (const InstallMessage &, const View &) |
void | deliver_trans_view (const InstallMessage &, const View &) |
void | deliver_empty_view () |
void | setall_committed (bool val) |
bool | is_all_committed () const |
void | setall_installed (bool val) |
bool | is_all_installed () const |
bool | is_representative (const UUID &pid) const |
void | shift_to (const State, const bool send_j=true) |
void | handle_msg (const Message &msg, const Datagram &dg=Datagram()) |
void | handle_up (const void *, const Datagram &, const ProtoUpMeta &) |
int | handle_down (Datagram &wb, const ProtoDownMeta &dm) |
void | handle_stable_view (const View &view) |
void | connect (bool first) |
void | close (bool force=false) |
void | close (const UUID &uuid) |
bool | set_param (const std::string &key, const std::string &val) |
void | handle_inactivity_timer () |
void | handle_retrans_timer () |
void | handle_install_timer () |
void | handle_stats_timer () |
gu::datetime::Date | next_expiration (const Timer) const |
void | reset_timers () |
gu::datetime::Date | handle_timers () |
![]() | |
void | set_up_context (Protolay *up) |
void | set_down_context (Protolay *down) |
void | unset_up_context (Protolay *up) |
void | unset_down_context (Protolay *down) |
void | send_up (const Datagram &dg, const ProtoUpMeta &up_meta) |
int | send_down (Datagram &dg, const ProtoDownMeta &down_meta) |
void | set_stable_view (const View &view) |
const Protolay * | id () const |
Static Public Member Functions | |
static std::string | to_string (const State s) |
static size_t | unserialize_message (const UUID &, const Datagram &, Message *) |
Friends | |
std::ostream & | operator<< (std::ostream &, const Proto &) |
Additional Inherited Members | |
![]() | |
Protolay (gu::Config &conf) | |
![]() | |
gu::Config & | conf_ |
Class implementing EVS protocol.
Flags controlling what debug information is logged if debug logging is turned on.
Enumerator | |
---|---|
D_STATE |
State changes |
D_TIMERS |
Timer handling |
D_CONSENSUS |
Consensus protocol |
D_USER_MSGS |
User messages |
D_DELEGATE_MSGS |
Delegate messages |
D_GAP_MSGS |
Gap messages |
D_JOIN_MSGS |
Join messages |
D_INSTALL_MSGS |
Install messages |
D_LEAVE_MSGS |
Leave messages |
D_FOREIGN_MSGS |
Foreing messages |
D_RETRANS |
Retransmitted/recovered messages |
D_DELIVERY |
Message delivery |
Flags controlling what info log is printed in logs.
Enumerator | |
---|---|
I_VIEWS |
View changes |
I_STATE |
State change information |
I_STATISTICS |
Statistics |
I_PROFILING |
Profiling information |
gcomm::evs::Proto::Proto | ( | gu::Config & | conf, |
const UUID & | my_uuid, | ||
SegmentId | segment, | ||
const gu::URI & | uri = gu::URI("evs://") , |
||
const size_t | mtu = std::numeric_limits< size_t >::max() |
||
) |
Default constructor.