java.io.Closeable, java.lang.AutoCloseable, Releasable, ZenPingpublic final class MockZenPing extends AbstractComponent implements ZenPing
ZenPing implementation which returns results based on a static in-memory map. This allows pinging
to be immediate and can be used to speed up tests.ZenPing.PingCollection, ZenPing.PingResponsedeprecationLogger, logger, settings| Constructor | Description |
|---|---|
MockZenPing(Settings settings,
PingContextProvider contextProvider) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
ping(java.util.function.Consumer<ZenPing.PingCollection> resultsConsumer,
TimeValue timeout) |
|
void |
start() |
logDeprecatedSetting, logRemovedSetting, nodeNamepublic MockZenPing(Settings settings, PingContextProvider contextProvider)
public void ping(java.util.function.Consumer<ZenPing.PingCollection> resultsConsumer, TimeValue timeout)
public void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in interface Releasable