Skip to content

Instantly share code, notes, and snippets.

@egcodes
Last active March 17, 2022 10:55
Show Gist options
  • Save egcodes/efcf437bb7af621bb2e5645b90cb55e4 to your computer and use it in GitHub Desktop.
Save egcodes/efcf437bb7af621bb2e5645b90cb55e4 to your computer and use it in GitHub Desktop.
try (var distLock = distributedLockProvider.lock("some-key", 3000, 10000)) {
if (distLock.isEmpty())
return;
log.info("I'm running...");
} catch (Exception e) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment