final void initState() { becomeClient(); view=null; first_view_sent=false; }
/** * Loop: determine coord. If coord is me --> handleLeave(). * Else send handleLeave() to coord until success */ public void leave(Address mbr) { Address coord=gms.determineCoordinator(); if(coord != null) sendLeaveReqTo(coord); gms.becomeClient(); }
/** The coordinator itself wants to leave the group */ public void leave(Address mbr) { if(mbr == null) { if(log.isErrorEnabled()) log.error(Util.getMessage("MemberSAddressIsNull")); return; } leaving=true; Address next_coord=gms.determineNextCoordinator(); if(next_coord != null) sendLeaveReqTo(next_coord); else { gms.getViewHandler().add(new Request(Request.LEAVE, mbr)); // If we're the coord leaving, ignore gms.leave_timeout: https://issues.jboss.org/browse/JGRP-1509 long timeout=(long)(Math.max(gms.leave_timeout, gms.view_ack_collection_timeout) * 1.10); gms.getViewHandler().waitUntilComplete(timeout); } gms.becomeClient(); }
final void initState() { becomeClient(); view=null; first_view_sent=false; }
final void initState() { becomeClient(); view_id=null; view=null; }
/** * Loop: determine coord. If coord is me --> handleLeave(). * Else send handleLeave() to coord until success */ public void leave(Address mbr) { Address coord=gms.determineCoordinator(); if(coord != null) sendLeaveReqTo(coord); gms.becomeClient(); }
/** * Loop: determine coord. If coord is me --> handleLeave(). * Else send handleLeave() to coord until success */ public void leave(Address mbr) { Address coord; int max_tries=3; Object result; leave_promise.reset(); if(mbr.equals(gms.local_addr)) leaving=true; while((coord=gms.determineCoordinator()) != null && max_tries-- > 0) { if(gms.local_addr.equals(coord)) { // I'm the coordinator gms.becomeCoordinator(); // gms.getImpl().handleLeave(mbr, false); // regular leave gms.getImpl().leave(mbr); // regular leave return; } if(log.isDebugEnabled()) log.debug("sending LEAVE request to " + coord + " (local_addr=" + gms.local_addr + ")"); sendLeaveMessage(coord, mbr); result=leave_promise.getResult(gms.leave_timeout); if(result != null) break; } gms.becomeClient(); }
/** The coordinator itself wants to leave the group */ public void leave(Address mbr) { if(mbr == null) { if(log.isErrorEnabled()) log.error(Util.getMessage("MemberSAddressIsNull")); return; } leaving=true; Address next_coord=gms.determineNextCoordinator(); if(next_coord != null) sendLeaveReqTo(next_coord); else { gms.getViewHandler().add(new Request(Request.LEAVE, mbr)); // If we're the coord leaving, ignore gms.leave_timeout: https://issues.jboss.org/browse/JGRP-1509 long timeout=(long)(Math.max(gms.leave_timeout, gms.view_ack_collection_timeout) * 1.10); gms.getViewHandler().waitUntilComplete(timeout); } gms.becomeClient(); }