redistributeOperations(node.destroyInputQueue()); } else if (failureMode == FailureMode.Cancel) { cancelOperations(node.destroyInputQueue());
redistributeOperations(qa.destroyInputQueue()); } else if (failureMode == FailureMode.Cancel) { cancelOperations(qa.destroyInputQueue());
redistributeOperations(qa.destroyInputQueue()); } else if(failureMode == FailureMode.Cancel) { cancelOperations(qa.destroyInputQueue());
redistributeOperations(qa.destroyInputQueue()); } else if(failureMode == FailureMode.Cancel) { cancelOperations(qa.destroyInputQueue());
redistributeOperations(node.destroyInputQueue()); } else if (failureMode == FailureMode.Cancel) { cancelOperations(node.destroyInputQueue());
redistributeOperations(qa.destroyInputQueue(), cause); } else if (failureMode == FailureMode.Cancel) { cancelOperations(qa.destroyInputQueue(), cause);
private Collection<Operation> shutdownNode(MemcachedNode node) throws IOException{ Collection<Operation> notCompletedOperations = node.destroyInputQueue(); if (node.getChannel() != null) { node.getChannel().close(); node.setSk(null); if (node.getBytesRemainingToWrite() > 0) { getLogger().warn("Shut down with %d bytes remaining to write", node.getBytesRemainingToWrite()); } getLogger().debug("Shut down channel %s", node.getChannel()); } return notCompletedOperations; }
if (failureMode == FailureMode.Cancel) { cancelOperations(node.destroyWriteQueue(false), cause); cancelOperations(node.destroyInputQueue(), cause); } else if (failureMode == FailureMode.Redistribute || failureMode == FailureMode.Retry) { redistributeOperations(node.destroyWriteQueue(true), cause); redistributeOperations(node.destroyInputQueue(), cause);
if (!addedQueue.contains(qa)) { nodesToShutdown.remove(qa); Collection<Operation> notCompletedOperations = qa.destroyInputQueue(); if (qa.getChannel() != null) { qa.getChannel().close();
/** * Check if nodes need to be shut down and do so if needed. * * @throws IOException if the channel could not be closed properly. */ private void handleShutdownQueue() throws IOException { for (MemcachedNode qa : nodesToShutdown) { if (!addedQueue.contains(qa)) { nodesToShutdown.remove(qa); metrics.decrementCounter(SHUTD_QUEUE_METRIC); Collection<Operation> notCompletedOperations = qa.destroyInputQueue(); if (qa.getChannel() != null) { qa.getChannel().close(); qa.setSk(null); if (qa.getBytesRemainingToWrite() > 0) { getLogger().warn("Shut down with %d bytes remaining to write", qa.getBytesRemainingToWrite()); } getLogger().debug("Shut down channel %s", qa.getChannel()); } redistributeOperations(notCompletedOperations); } } }
for(MemcachedNode currentNode : getLocator().getAll()) { if(currentNode.equals(node)) { Collection<Operation> notCompletedOperations = currentNode.destroyInputQueue(); if (currentNode.getChannel() != null) { currentNode.getChannel().close();