Package org.elasticsearch.test
Class InternalTestCluster.RestartCallback
- java.lang.Object
-
- org.elasticsearch.test.InternalTestCluster.RestartCallback
-
- Enclosing class:
- InternalTestCluster
public static class InternalTestCluster.RestartCallback extends java.lang.ObjectAn abstract class that is called duringInternalTestCluster.rollingRestart(InternalTestCluster.RestartCallback)and / orInternalTestCluster.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 booleanclearData(java.lang.String nodeName)If this returnstrueall data for the node with the given node name will be cleared including gateways and all index data.voiddoAfterNodes(int n, Client client)Executed for each node before then + 1node is restarted.SettingsonNodeStopped(java.lang.String nodeName)Executed once the give node name has been stopped.booleanvalidateClusterForming()returns true if the restart should also validate the cluster has reformed
-
-
-
Method Detail
-
onNodeStopped
public Settings onNodeStopped(java.lang.String nodeName) throws java.lang.Exception
Executed once the give node name has been stopped.- Throws:
java.lang.Exception
-
doAfterNodes
public void doAfterNodes(int n, Client client) throws java.lang.ExceptionExecuted for each node before then + 1node 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 returnstrueall data for the node with the given node name will be cleared including gateways and all index data. Returnsfalseby default.
-
validateClusterForming
public boolean validateClusterForming()
returns true if the restart should also validate the cluster has reformed
-
-