Gets and acquires a distributed lock based on the key.
Gets and acquires a distributed lock based on the key. Make sure that you 'release' the lock in a finally block.
key to lock on - equivalent to a path in zookeeper
how long to wait to acquire the lock, in millis
the lock, if obtained
Gets and acquires a distributed lock based on the key.
Gets and acquires a distributed lock based on the key. Make sure that you 'release' the lock in a finally block.
key to lock on - equivalent to a path in zookeeper
the lock
Execute a function wrapped in a lock
Execute a function wrapped in a lock
result type
key to lock on
how long to wait to acquire the lock, in millis
function to run with the lock
function to run if the lock could not be acquired
Execute a function wrapped in a lock
Execute a function wrapped in a lock
result type
key to lock on
function to run with the lock