java.io.Closeable
, java.lang.AutoCloseable
, org.elasticsearch.discovery.zen.UnicastHostsProvider
public final class MockUncasedHostProvider
extends java.lang.Object
implements org.elasticsearch.discovery.zen.UnicastHostsProvider, java.io.Closeable
UnicastHostsProvider
implementation which returns results based on a static in-memory map. This allows running
with nodes that only determine their transport address at runtime, which is the default behavior of
InternalTestCluster
Constructor | Description |
---|---|
MockUncasedHostProvider(java.util.function.Supplier<org.elasticsearch.cluster.node.DiscoveryNode> localNodeSupplier,
org.elasticsearch.cluster.ClusterName clusterName) |
Modifier and Type | Method | Description |
---|---|---|
java.util.List<org.elasticsearch.cluster.node.DiscoveryNode> |
buildDynamicNodes() |
|
void |
close() |
public MockUncasedHostProvider(java.util.function.Supplier<org.elasticsearch.cluster.node.DiscoveryNode> localNodeSupplier, org.elasticsearch.cluster.ClusterName clusterName)
public java.util.List<org.elasticsearch.cluster.node.DiscoveryNode> buildDynamicNodes()
buildDynamicNodes
in interface org.elasticsearch.discovery.zen.UnicastHostsProvider
public void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable