public static class InternalTestCluster.RestartCallback
extends java.lang.Object
InternalTestCluster.rollingRestart(InternalTestCluster.RestartCallback)
and / or InternalTestCluster.fullRestart(InternalTestCluster.RestartCallback)
to execute actions at certain
stages of the restart.Constructor and Description |
---|
RestartCallback() |
Modifier and Type | Method and 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.
|
boolean |
doRestart(java.lang.String nodeName)
If this returns
false the node with the given node name will not be restarted. |
org.elasticsearch.common.settings.Settings |
onNodeStopped(java.lang.String nodeName)
Executed once the give node name has been stopped.
|
public org.elasticsearch.common.settings.Settings onNodeStopped(java.lang.String nodeName) throws java.lang.Exception
java.lang.Exception
public void doAfterNodes(int n, org.elasticsearch.client.Client client) throws java.lang.Exception
java.lang.Exception
public boolean clearData(java.lang.String nodeName)
true
all data for the node with the given node name will be cleared including
gateways and all index data. Returns false
by default.public boolean doRestart(java.lang.String nodeName)
false
the node with the given node name will not be restarted. It will be
closed and removed from the cluster. Returns true
by default.