|
1 | | -using System; |
| 1 | +using Elasticsearch.Net; |
| 2 | +using System; |
2 | 3 | using System.Collections.Generic; |
3 | | -using System.Threading.Tasks; |
4 | | -using Elasticsearch.Net; |
5 | 4 | using System.IO; |
6 | 5 | using System.Linq; |
| 6 | +using System.Text; |
| 7 | +using System.Text.RegularExpressions; |
| 8 | +using System.Threading.Tasks; |
7 | 9 |
|
8 | 10 | namespace Nest |
9 | 11 | { |
10 | 12 | using NodesHotThreadConverter = Func<IElasticsearchResponse, Stream, NodesHotThreadsResponse>; |
11 | | - using System.Text.RegularExpressions; |
12 | | - using System.Text; |
13 | 13 |
|
14 | 14 | public partial class ElasticClient |
15 | 15 | { |
@@ -134,6 +134,44 @@ public Task<INodesHotThreadsResponse> NodesHotThreadsAsync(INodesHotThreadsReque |
134 | 134 | ); |
135 | 135 | } |
136 | 136 |
|
| 137 | + /// <inheritdoc /> |
| 138 | + public INodesShutdownResponse NodesShutdown(Func<NodesShutdownDescriptor, NodesShutdownDescriptor> nodesShutdownSelector = null) |
| 139 | + { |
| 140 | + nodesShutdownSelector = nodesShutdownSelector ?? (s => s); |
| 141 | + return this.Dispatch<NodesShutdownDescriptor, NodesShutdownRequestParameters, NodesShutdownResponse>( |
| 142 | + nodesShutdownSelector, |
| 143 | + (p, d) => this.RawDispatch.NodesShutdownDispatch<NodesShutdownResponse>(p) |
| 144 | + ); |
| 145 | + } |
| 146 | + |
| 147 | + /// <inheritdoc /> |
| 148 | + public Task<INodesShutdownResponse> NodesShutdownAsync(Func<NodesShutdownDescriptor, NodesShutdownDescriptor> nodesShutdownSelector = null) |
| 149 | + { |
| 150 | + nodesShutdownSelector = nodesShutdownSelector ?? (s => s); |
| 151 | + return this.DispatchAsync<NodesShutdownDescriptor, NodesShutdownRequestParameters, NodesShutdownResponse, INodesShutdownResponse>( |
| 152 | + nodesShutdownSelector, |
| 153 | + (p, d) => this.RawDispatch.NodesShutdownDispatchAsync<NodesShutdownResponse>(p) |
| 154 | + ); |
| 155 | + } |
| 156 | + |
| 157 | + /// <inheritdoc /> |
| 158 | + public INodesShutdownResponse NodesShutdown(INodesShutdownRequest nodesShutdownRequest) |
| 159 | + { |
| 160 | + return this.Dispatch<INodesShutdownRequest, NodesShutdownRequestParameters, NodesShutdownResponse>( |
| 161 | + nodesShutdownRequest, |
| 162 | + (p, d) => this.RawDispatch.NodesShutdownDispatch<NodesShutdownResponse>(p) |
| 163 | + ); |
| 164 | + } |
| 165 | + |
| 166 | + /// <inheritdoc /> |
| 167 | + public Task<INodesShutdownResponse> NodesShutdownAsync(INodesShutdownRequest nodesShutdownRequest) |
| 168 | + { |
| 169 | + return this.DispatchAsync<INodesShutdownRequest, NodesShutdownRequestParameters, NodesShutdownResponse, INodesShutdownResponse>( |
| 170 | + nodesShutdownRequest, |
| 171 | + (p, d) => this.RawDispatch.NodesShutdownDispatchAsync<NodesShutdownResponse>(p) |
| 172 | + ); |
| 173 | + } |
| 174 | + |
137 | 175 | /// <summary> |
138 | 176 | /// Because the nodes.hot_threads endpoint returns plain text instead of JSON, we have to |
139 | 177 | /// manually parse the response text into a typed response object. |
|
0 commit comments