예제 #1
0
파일: GMS.java 프로젝트: jtoerber/JGroups
 public void becomeClient() {
   ClientGmsImpl tmp = (ClientGmsImpl) impls.get(CLIENT);
   if (tmp == null) {
     tmp = new ClientGmsImpl(this);
     impls.put(CLIENT, tmp);
   }
   try {
     tmp.init();
   } catch (Exception e) {
     log.error("exception switching to client role", e);
   }
   setImpl(tmp);
 }
예제 #2
0
파일: GMS.java 프로젝트: jtoerber/JGroups
 public void becomeCoordinator() {
   CoordGmsImpl tmp = (CoordGmsImpl) impls.get(COORD);
   if (tmp == null) {
     tmp = new CoordGmsImpl(this);
     impls.put(COORD, tmp);
   }
   try {
     tmp.init();
   } catch (Exception e) {
     log.error("exception switching to coordinator role", e);
   }
   setImpl(tmp);
 }
예제 #3
0
파일: GMS.java 프로젝트: jtoerber/JGroups
  public void becomeParticipant() {
    ParticipantGmsImpl tmp = (ParticipantGmsImpl) impls.get(PART);

    if (tmp == null) {
      tmp = new ParticipantGmsImpl(this);
      impls.put(PART, tmp);
    }
    try {
      tmp.init();
    } catch (Exception e) {
      log.error("exception switching to participant", e);
    }
    setImpl(tmp);
  }