public RouterStub unregisterStub(IpAddress router_addr) { RouterStub stub=find(router_addr); if(stub != null) remove(stub); return stub; }
protected boolean reconnect(Target target) { RouterStub stub=new RouterStub(target.bind_addr, target.router_addr, this.use_nio, this).receiver(target.receiver); if(!add(stub)) return false; try { stub.connect(this.cluster_name, this.local_addr, this.logical_name, this.phys_addr); log.debug("re-established connection to %s successfully for group=%s and address=%s", stub.remote(), this.cluster_name, this.local_addr); return true; } catch(Throwable t) { remove(stub); return false; } }
protected void moveStubToReconnects(RouterStub stub) { if(stub == null) return; remove(stub); if(add(new Target(stub.local(), stub.remote(), stub.receiver()))) { log.debug("connection to %s closed, trying to re-establish connection", stub.remote()); startReconnector(); } }
public RouterStub unregisterStub(IpAddress router_addr) { RouterStub stub=find(router_addr); if(stub != null) remove(stub); return stub; }
protected boolean reconnect(Target target) { RouterStub stub=new RouterStub(target.bind_addr, target.router_addr, this.use_nio, this).receiver(target.receiver); if(!add(stub)) return false; try { stub.connect(this.cluster_name, this.local_addr, this.logical_name, this.phys_addr); log.debug("re-established connection to %s successfully for group=%s and address=%s", stub.remote(), this.cluster_name, this.local_addr); return true; } catch(Throwable t) { remove(stub); return false; } }
protected void moveStubToReconnects(RouterStub stub) { if(stub == null) return; remove(stub); if(add(new Target(stub.local(), stub.remote(), stub.receiver()))) { log.debug("connection to %s closed, trying to re-establish connection", stub.remote()); startReconnector(); } }