Package org.elasticsearch.test
Class InternalTestCluster.RestartCallback
java.lang.Object
org.elasticsearch.test.InternalTestCluster.RestartCallback
- Enclosing class:
- InternalTestCluster
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
If this returnstrue
all data for the node with the given node name will be cleared including gateways and all index data.void
doAfterNodes
(int n, Client client) Executed for each node before then + 1
node is restarted.void
onNodeStopped
(String nodeName) Executed once the give node name has been stopped.boolean
returns true if the restart should also validate the cluster has reformed
-
Constructor Details
-
RestartCallback
public RestartCallback()
-
-
Method Details
-
onNodeStopped
Executed once the give node name has been stopped.- Throws:
Exception
-
onAllNodesStopped
- Throws:
Exception
-
doAfterNodes
Executed for each node before then + 1
node is restarted. The given client is an active client to the node that will be restarted next.- Throws:
Exception
-
clearData
If this returnstrue
all data for the node with the given node name will be cleared including gateways and all index data. Returnsfalse
by default. -
validateClusterForming
public boolean validateClusterForming()returns true if the restart should also validate the cluster has reformed
-