Constructor and Description |
---|
Lock.With(Lock lock)
Deprecated.
Kept only to avoid breaking existing code.
|
Lock.With(Lock lock,
long lockWaitTimeout)
Constructs an executor that will grab the named lock.
|
@Deprecated public Lock.With(Lock lock)
protected abstract Object doBody() throws IOException
IOException
public Object run() throws IOException
doBody()
while lock is obtained. Blocks if lock
cannot be obtained immediately. Retries to obtain lock once per second
until it is obtained, or until it has tried ten times. Lock is released when
doBody()
exits.IOException