@Override public int hashCode() { return session.hashCode(); }
/** Sends an elect event to the session for the given member. */ public void elect(MemberState member) { if (session.state().active()) { session.publish("elect", member.id()); } }
/** Sends a term event to the session for the given member. */ public void term(long term) { if (session.state().active()) { session.publish("term", term); } }
/** Sends a leave event to the session for the given member. */ public void leave(MemberState member) { if (session.state().active()) { session.publish("leave", member.id()); } }
/** Sends a join event to the session for the given member. */ public void join(MemberState member) { if (session.state().active()) { session.publish("join", member.info()); } }
/** Returns the session ID. */ public long id() { return session.id(); }