}
@Override
protected void masterOperation(final NodesShutdownRequest request, final ClusterState state, final ActionListener<NodesShutdownResponse> listener) throws ElasticsearchException {
if (disabled) {
throw new ElasticsearchIllegalStateException("Shutdown is disabled");
}
final ObjectOpenHashSet<DiscoveryNode> nodes = new ObjectOpenHashSet<>();
if (state.nodes().isAllNodes(request.nodesIds)) {
logger.info("[cluster_shutdown]: requested, shutting down in [{}]", request.delay);
nodes.addAll(state.nodes().dataNodes().values());