IndexerDefinition indexer = getFreshIndexer(indexerName);
if (checkDeleted) {
if (indexer.getLifecycleState() == LifecycleState.DELETE_REQUESTED ||
indexer.getLifecycleState() == LifecycleState.DELETING) {
throw new IndexerModelException("An indexer in state " + indexer.getLifecycleState() + " cannot be locked.");
}
}
final String lockPath = indexerCollectionPathSlash + indexerName + "/lock";