Class SniffOnFailureListener

java.lang.Object
org.elasticsearch.client.RestClient.FailureListener
org.elasticsearch.client.sniff.SniffOnFailureListener

public class SniffOnFailureListener
extends RestClient.FailureListener
RestClient.FailureListener implementation that allows to perform sniffing on failure. Gets notified whenever a failure happens and uses a Sniffer instance to manually reload hosts and sets them back to the RestClient. The Sniffer instance needs to be lazily set through setSniffer(Sniffer).
  • Constructor Summary

    Constructors 
    Constructor Description
    SniffOnFailureListener()  
  • Method Summary

    Modifier and Type Method Description
    void onFailure​(Node node)  
    void setSniffer​(Sniffer sniffer)
    Sets the Sniffer instance used to perform sniffing

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait