/** * Called by join(). Installs the view returned by calling Coord.handleJoin() and becomes coordinator. */ private boolean installView(View new_view, Digest digest) { if(!new_view.containsMember(gms.local_addr)) { log.error("%s: I'm not member of %s, will not install view", gms.local_addr, new_view); return false; } gms.installView(new_view, digest); if(gms.impl == null || gms.impl instanceof ClientGmsImpl) // installView() should have set the role (impl) gms.becomeParticipant(); gms.getUpProtocol().up(new Event(Event.BECOME_SERVER)); gms.getDownProtocol().down(new Event(Event.BECOME_SERVER)); return true; }
/** * Called by join(). Installs the view returned by calling Coord.handleJoin() and * becomes coordinator. */ private boolean installView(View new_view) { Vector mems=new_view.getMembers(); if(log.isDebugEnabled()) log.debug("new_view=" + new_view); if(gms.local_addr == null || mems == null || !mems.contains(gms.local_addr)) { if(log.isErrorEnabled()) log.error("I (" + gms.local_addr + ") am not member of " + mems + ", will not install view"); return false; } gms.installView(new_view); gms.becomeParticipant(); gms.getUpProtocol().up(new Event(Event.BECOME_SERVER)); gms.getDownProtocol().down(new Event(Event.BECOME_SERVER)); return true; }
/** * Called by join(). Installs the view returned by calling Coord.handleJoin() and becomes coordinator. */ private boolean installView(View new_view, Digest digest) { if(!new_view.containsMember(gms.local_addr)) { log.error("%s: I'm not member of %s, will not install view", gms.local_addr, new_view); return false; } gms.installView(new_view, digest); if(gms.impl == null || gms.impl instanceof ClientGmsImpl) // installView() should have set the role (impl) gms.becomeParticipant(); gms.getUpProtocol().up(new Event(Event.BECOME_SERVER)); gms.getDownProtocol().down(new Event(Event.BECOME_SERVER)); return true; }