Skip to content

Instantly share code, notes, and snippets.

@suresk
Created April 10, 2016 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suresk/03a9374323b8c9a51389f565c1a4ec75 to your computer and use it in GitHub Desktop.
Save suresk/03a9374323b8c9a51389f565c1a4ec75 to your computer and use it in GitHub Desktop.
Elasticsearch clear lock
private void releaseLock(String aliasName)
{
synchronized (aliasName)
{
DeleteRequest deleteRequest = new DeleteRequest().index(LOCK_DIRECTORY).type(LOCK_TYPE).id(aliasName);
elasticClient.delete(deleteRequest);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment