Class InternalTestCluster.RestartCallback

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

public static class InternalTestCluster.RestartCallback extends 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 Details

    • RestartCallback

      public RestartCallback()
  • Method Details

    • onNodeStopped

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

      public void onAllNodesStopped() throws Exception
      Throws:
      Exception
    • doAfterNodes

      public void doAfterNodes(int n, org.elasticsearch.client.internal.Client client) throws 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:
      Exception
    • clearData

      public boolean clearData(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