Java Code Examples for org.elasticsearch.cluster.node.DiscoveryNode#clientNode()
The following examples show how to use
org.elasticsearch.cluster.node.DiscoveryNode#clientNode() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClusterStatsNodes.java From Elasticsearch with Apache License 2.0 | 5 votes |
public void addNodeInfo(NodeInfo nodeInfo) { total++; DiscoveryNode node = nodeInfo.getNode(); if (node.masterNode()) { if (node.dataNode()) { masterData++; } else { masterOnly++; } } else if (node.dataNode()) { dataOnly++; } else if (node.clientNode()) { client++; } }
Example 2
Source File: ThreadedActionListener.java From Elasticsearch with Apache License 2.0 | 5 votes |
public Wrapper(ESLogger logger, Settings settings, ThreadPool threadPool) { this.logger = logger; this.threadPool = threadPool; // Should the action listener be threaded or not by default. Action listeners are automatically threaded for client // nodes and transport client in order to make sure client side code is not executed on IO threads. this.threadedListener = DiscoveryNode.clientNode(settings) || TransportClient.CLIENT_TYPE.equals(settings.get(Client.CLIENT_TYPE_SETTING)); }
Example 3
Source File: SirenJoinPlugin.java From siren-join with GNU Affero General Public License v3.0 | 5 votes |
@Inject public SirenJoinPlugin(Settings settings) { if (DiscoveryNode.clientNode(settings)) { this.isEnabled = "node".equals(settings.get("client.type")); } else { this.isEnabled = true; } }