Class InternalTestCluster.RestartCallback

java.lang.Object
org.elasticsearch.test.InternalTestCluster.RestartCallback
Enclosing class:
InternalTestCluster

public static class InternalTestCluster.RestartCallback
extends java.lang.Object
An abstract class that is called during InternalTestCluster.rollingRestart(InternalTestCluster.RestartCallback) and / or InternalTestCluster.fullRestart(InternalTestCluster.RestartCallback) to execute actions at certain stages of the restart.
  • Constructor Summary

    Constructors
    Constructor Description
    RestartCallback()  
  • Method Summary

    Modifier and Type Method Description
    boolean clearData​(java.lang.String nodeName)
    If this returns true all data for the node with the given node name will be cleared including gateways and all index data.
    void doAfterNodes​(int n, org.elasticsearch.client.Client client)
    Executed for each node before the n + 1 node is restarted.
    void onAllNodesStopped()  
    org.elasticsearch.common.settings.Settings onNodeStopped​(java.lang.String nodeName)
    Executed once the give node name has been stopped.
    boolean validateClusterForming()
    returns true if the restart should also validate the cluster has reformed

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RestartCallback

      public RestartCallback()
  • Method Details

    • onNodeStopped

      public org.elasticsearch.common.settings.Settings onNodeStopped​(java.lang.String nodeName) throws java.lang.Exception
      Executed once the give node name has been stopped.
      Throws:
      java.lang.Exception
    • onAllNodesStopped

      public void onAllNodesStopped() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • doAfterNodes

      public void doAfterNodes​(int n, org.elasticsearch.client.Client client) throws java.lang.Exception
      Executed for each node before the n + 1 node is restarted. The given client is an active client to the node that will be restarted next.
      Throws:
      java.lang.Exception
    • clearData

      public boolean clearData​(java.lang.String nodeName)
      If this returns true all data for the node with the given node name will be cleared including gateways and all index data. Returns false by default.
    • validateClusterForming

      public boolean validateClusterForming()
      returns true if the restart should also validate the cluster has reformed