public class LockResource extends Object implements Closeable
try (LockResource r = new LockResource(lock)) { ... }
Constructor and Description |
---|
LockResource(Lock lock)
Creates a new instance of
LockResource using the given lock. |
public LockResource(Lock lock)
LockResource
using the given lock.lock
- the lock to acquirepublic void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2023. All Rights Reserved.