com.github.alexcojocaru.mojo.elasticsearch.v2.step.BlockProcessExecutionStep Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticsearch-maven-plugin Show documentation
Show all versions of elasticsearch-maven-plugin Show documentation
A Maven plugin to run a single node Elasticsearch cluster during the integration test phase of a build
package com.github.alexcojocaru.mojo.elasticsearch.v2.step;
import com.github.alexcojocaru.mojo.elasticsearch.v2.ClusterConfiguration;
import com.github.alexcojocaru.mojo.elasticsearch.v2.ExecutionLock;
/**
* Block the current process execution if the setAwait flag is set on the cluster configuration.
*
* @author Alex Cojocaru
*/
public class BlockProcessExecutionStep
implements ClusterStep
{
@Override
public void execute(ClusterConfiguration config)
{
if (config.isSetAwait())
{
new ExecutionLock(config.getLog()).lock();
}
}
}