Nodes Info API: Add all flag to return all data, closes #1676.

This commit is contained in:
Shay Banon 2012-02-07 19:19:33 +02:00
parent a89878ce6c
commit 636c4ae8fa
3 changed files with 27 additions and 0 deletions

View File

@ -65,6 +65,21 @@ public class NodesInfoRequest extends NodesOperationRequest {
return this;
}
/**
* Sets to return all the data.
*/
public NodesInfoRequest all() {
settings = true;
os = true;
process = true;
jvm = true;
threadPool = true;
network = true;
transport = true;
http = true;
return this;
}
/**
* Should the node settings be returned.
*/

View File

@ -45,6 +45,14 @@ public class NodesInfoRequestBuilder extends BaseClusterRequestBuilder<NodesInfo
return this;
}
/**
* Sets to reutrn all the data.
*/
public NodesInfoRequestBuilder all() {
request.all();
return this;
}
/**
* Should the node settings be returned.
*/

View File

@ -85,6 +85,10 @@ public class RestNodesInfoAction extends BaseRestHandler {
if (clear) {
nodesInfoRequest.clear();
}
boolean all = request.paramAsBoolean("all", false);
if (all) {
nodesInfoRequest.all();
}
nodesInfoRequest.settings(request.paramAsBoolean("settings", nodesInfoRequest.settings()));
nodesInfoRequest.os(request.paramAsBoolean("os", nodesInfoRequest.os()));
nodesInfoRequest.process(request.paramAsBoolean("process", nodesInfoRequest.process()));