Package org.elasticsearch.discovery.zen
Class SettingsBasedHostsProvider
- java.lang.Object
-
- org.elasticsearch.discovery.zen.SettingsBasedHostsProvider
-
- All Implemented Interfaces:
UnicastHostsProvider
public class SettingsBasedHostsProvider extends java.lang.Object implements UnicastHostsProvider
An implementation ofUnicastHostsProvider
that reads hosts/ports from the "discovery.zen.ping.unicast.hosts" node setting. If the port is left off an entry, a default port of 9300 is assumed. An example unicast hosts setting might look as follows: [67.81.244.10, 67.81.244.11:9305, 67.81.244.15:9400]
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.discovery.zen.UnicastHostsProvider
UnicastHostsProvider.HostsResolver
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<java.util.List<java.lang.String>>
DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING
static int
LIMIT_FOREIGN_PORTS_COUNT
static int
LIMIT_LOCAL_PORTS_COUNT
-
Constructor Summary
Constructors Constructor Description SettingsBasedHostsProvider(Settings settings, TransportService transportService)
-
Method Summary
Modifier and Type Method Description java.util.List<TransportAddress>
buildDynamicHosts(UnicastHostsProvider.HostsResolver hostsResolver)
Builds the dynamic list of unicast hosts to be used for unicast discovery.
-
-
-
Field Detail
-
DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING
public static final Setting<java.util.List<java.lang.String>> DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING
-
LIMIT_FOREIGN_PORTS_COUNT
public static final int LIMIT_FOREIGN_PORTS_COUNT
- See Also:
- Constant Field Values
-
LIMIT_LOCAL_PORTS_COUNT
public static final int LIMIT_LOCAL_PORTS_COUNT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SettingsBasedHostsProvider
public SettingsBasedHostsProvider(Settings settings, TransportService transportService)
-
-
Method Detail
-
buildDynamicHosts
public java.util.List<TransportAddress> buildDynamicHosts(UnicastHostsProvider.HostsResolver hostsResolver)
Description copied from interface:UnicastHostsProvider
Builds the dynamic list of unicast hosts to be used for unicast discovery.- Specified by:
buildDynamicHosts
in interfaceUnicastHostsProvider
-
-