public void stop() { bundler_thread.stop(); }
public void stop() { bundler_thread.stop(); }
public void stop() { bundler_thread.stop(); }
protected void stop() { runner.stop(); }
public synchronized void stop() { runner.stop(); super.stop(); }
public void close() { runner.stop(); Util.close(in, out, sock); }
public void stop() { super.stop(); if(srv_sock_handler != null) { srv_sock_handler.stop(); // should also close srv_sock srv_sock_handler=null; Util.close(srv_sock); // not needed, but second line of defense srv_sock=null; } }
protected synchronized void stopKeyserver() { if(srv_sock_handler != null) { log.debug("%s: ceasing to be the keyserver; closing the server socket", local_addr); srv_sock_handler.stop(); srv_sock_handler=null; } if(srv_sock != null) { Util.close(srv_sock); // should not be necessary (check) srv_sock=null; } }
public void run() { // System.out.printf("[%s] reading from sock, conn: %s\n", Thread.currentThread().getName(), this); try { int len=in.readInt(); if(buffer == null || buffer.length < len) buffer=new byte[len]; in.readFully(buffer, 0, len); ByteArrayDataInputStream input=new ByteArrayDataInputStream(buffer, 0, len); Message msg=new Message(false); msg.readFrom(input); thread_pool.execute(() -> up_prot.up(msg)); } catch(IOException io_ex) { runner.stop(); throw new RuntimeException(io_ex); } catch(Exception ex) { if(sock.isClosed()) runner.stop(); throw new RuntimeException(ex); } }
@Override public void handleView(View v) { Address old_coord=this.view != null? this.view.getCoord() : null; super.handleView(v); if(v.size() > 0) { coord=v.getCoord(); log.debug("%s: coord=%s, is_coord=%b", local_addr, coord, isCoord()); } if(Objects.equals(local_addr, coord)) { if(v instanceof MergeView || !Objects.equals(local_addr, old_coord)) { // I'm the new coord: run reconciliation to find all existing locks (and pending lock/unlock requests) runReconciliation(); req_handler.start(); } } else { if(Objects.equals(local_addr, old_coord)) { log.debug("%s: not coordinator anymore; stopping the request handler", local_addr); req_handler.stop(); // clears the req-queue server_locks.clear(); } } }
public void stop() { bundler_thread.stop(); }
public void stop() { bundler_thread.stop(); }
protected void stop() { runner.stop(); }
public void stop() { bundler_thread.stop(); }
public synchronized void stop() { runner.stop(); super.stop(); }
public void close() { runner.stop(); Util.close(in, out, sock); }
protected synchronized void stopKeyserver() { if(srv_sock_handler != null) { log.debug("%s: ceasing to be the keyserver; closing the server socket", local_addr); srv_sock_handler.stop(); srv_sock_handler=null; } if(srv_sock != null) { Util.close(srv_sock); // should not be necessary (check) srv_sock=null; } }
public void stop() { super.stop(); if(srv_sock_handler != null) { srv_sock_handler.stop(); // should also close srv_sock srv_sock_handler=null; Util.close(srv_sock); // not needed, but second line of defense srv_sock=null; } }
public void run() { // System.out.printf("[%s] reading from sock, conn: %s\n", Thread.currentThread().getName(), this); try { int len=in.readInt(); if(buffer == null || buffer.length < len) buffer=new byte[len]; in.readFully(buffer, 0, len); ByteArrayDataInputStream input=new ByteArrayDataInputStream(buffer, 0, len); Message msg=new Message(false); msg.readFrom(input); thread_pool.execute(() -> up_prot.up(msg)); } catch(IOException io_ex) { runner.stop(); throw new RuntimeException(io_ex); } catch(Exception ex) { if(sock.isClosed()) runner.stop(); throw new RuntimeException(ex); } }
@Override public void handleView(View v) { Address old_coord=this.view != null? this.view.getCoord() : null; super.handleView(v); if(v.size() > 0) { coord=v.getCoord(); log.debug("%s: coord=%s, is_coord=%b", local_addr, coord, isCoord()); } if(Objects.equals(local_addr, coord)) { if(v instanceof MergeView || !Objects.equals(local_addr, old_coord)) { // I'm the new coord: run reconciliation to find all existing locks (and pending lock/unlock requests) runReconciliation(); req_handler.start(); } } else { if(Objects.equals(local_addr, old_coord)) { log.debug("%s: not coordinator anymore; stopping the request handler", local_addr); req_handler.stop(); // clears the req-queue server_locks.clear(); } } }