if (!authenticate(socket))
if (!authenticate(socket))
/** * Wait for callbacks and don't allow any more to be created (since they could require writing hints) */ public void shutdown() { logger.info("Waiting for messaging service to quiesce"); // We may need to schedule hints on the mutation stage, so it's erroneous to shut down the mutation stage first assert !StageManager.getStage(Stage.MUTATION).isShutdown(); // the important part if (!callbacks.shutdownBlocking()) logger.warn("Failed to wait for messaging service callbacks shutdown"); // attempt to humor tests that try to stop and restart MS try { for (SocketThread th : socketThreads) try { th.close(); } catch (IOException e) { // see https://issues.apache.org/jira/browse/CASSANDRA-10545 handleIOExceptionOnClose(e); } } catch (IOException e) { throw new IOError(e); } }
/** * Wait for callbacks and don't allow any more to be created (since they could require writing hints) */ public void shutdown() { logger.info("Waiting for messaging service to quiesce"); // We may need to schedule hints on the mutation stage, so it's erroneous to shut down the mutation stage first assert !StageManager.getStage(Stage.MUTATION).isShutdown(); // the important part callbacks.shutdownBlocking(); // attempt to humor tests that try to stop and restart MS try { for (SocketThread th : socketThreads) try { th.close(); } catch (IOException e) { // see https://issues.apache.org/jira/browse/CASSANDRA-10545 handleIOException(e); } } catch (IOException e) { throw new IOError(e); } }
/** * Wait for callbacks and don't allow any more to be created (since they could require writing hints) */ public void shutdown() { logger.info("Waiting for messaging service to quiesce"); // We may need to schedule hints on the mutation stage, so it's erroneous to shut down the mutation stage first assert !StageManager.getStage(Stage.MUTATION).isShutdown(); // the important part if (!callbacks.shutdownBlocking()) logger.warn("Failed to wait for messaging service callbacks shutdown"); // attempt to humor tests that try to stop and restart MS try { for (SocketThread th : socketThreads) try { th.close(); } catch (IOException e) { // see https://issues.apache.org/jira/browse/CASSANDRA-10545 handleIOExceptionOnClose(e); } } catch (IOException e) { throw new IOError(e); } }
/** * Wait for callbacks and don't allow any more to be created (since they could require writing hints) */ public void shutdown() { logger.info("Waiting for messaging service to quiesce"); // We may need to schedule hints on the mutation stage, so it's erroneous to shut down the mutation stage first assert !StageManager.getStage(Stage.MUTATION).isShutdown(); // the important part if (!callbacks.shutdownBlocking()) logger.warn("Failed to wait for messaging service callbacks shutdown"); // attempt to humor tests that try to stop and restart MS try { for (SocketThread th : socketThreads) try { th.close(); } catch (IOException e) { // see https://issues.apache.org/jira/browse/CASSANDRA-10545 handleIOExceptionOnClose(e); } } catch (IOException e) { throw new IOError(e); } }
/** * Listen on the specified port. * * @param localEp InetAddress whose port to listen on. */ public void listen(InetAddress localEp) throws ConfigurationException { callbacks.reset(); // hack to allow tests to stop/restart MS for (ServerSocket ss : getServerSockets(localEp)) { SocketThread th = new SocketThread(ss, "ACCEPT-" + localEp); th.start(); socketThreads.add(th); } listenGate.signalAll(); }
/** * Listen on the specified port. * * @param localEp InetAddress whose port to listen on. */ private void listen(InetAddress localEp) throws ConfigurationException { for (ServerSocket ss : getServerSockets(localEp)) { SocketThread th = new SocketThread(ss, "ACCEPT-" + localEp); th.start(); socketThreads.add(th); } }
/** * Listen on the specified port. * * @param localEp InetAddress whose port to listen on. */ private void listen(InetAddress localEp) throws ConfigurationException { for (ServerSocket ss : getServerSockets(localEp)) { SocketThread th = new SocketThread(ss, "ACCEPT-" + localEp); th.start(); socketThreads.add(th); } }
/** * Listen on the specified port. * * @param localEp InetAddress whose port to listen on. */ private void listen(InetAddress localEp) throws ConfigurationException { for (ServerSocket ss : getServerSockets(localEp)) { SocketThread th = new SocketThread(ss, "ACCEPT-" + localEp); th.start(); socketThreads.add(th); } }