예제 #1
0
 @Override
 public int hashCode() {
   return session.hashCode();
 }
예제 #2
0
 /** 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());
   }
 }
예제 #3
0
 /** Sends a term event to the session for the given member. */
 public void term(long term) {
   if (session.state().active()) {
     session.publish("term", term);
   }
 }
예제 #4
0
 /** 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());
   }
 }
예제 #5
0
 /** 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());
   }
 }
예제 #6
0
 /** Returns the session ID. */
 public long id() {
   return session.id();
 }