/** terminate this context */ public synchronized void term() { clientScheduleService.stop(); for (IConnection conn : connections.values()) { conn.close(); } connections = null; // we need to release resources associated with client channel factory clientChannelFactory.releaseExternalResources(); }
@Override public void shutdown() { IConnection sendConn = context.connect(topologyId, "localhost", port, true); sendConn.send(-1, KryoTupleSerializer.serialize(-1)); LOG.info("Waiting for virtual port at url " + port + " to die"); try { vthread.join(); } catch (InterruptedException e) { } LOG.info("Shutdown virtual port at url: " + port); }