All Implemented Interfaces:
Reference counted Lock resource, automatically unlocks and decrements the reference count.
It contains a lock and a reference count for that lock, and will decrement
the lock reference count and unlocking when the resource is closed.
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Releases the lock and decrement the ref count if a ref counter was provided
at construction time.
Methods inherited from class java.lang.
Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Creates a new instance of
using the given lock and reference counter. The
reference counter should have been initialized and incremented outside of this class.
lock - the lock to acquire
mode - the mode to acquire the lock in
acquireLock - whether to lock the lock
refCount - ref count for the lock
useTryLock - applicable only if acquireLock is true. Determines whether or not to use
to acquire the lock
Copyright © 2021. All Rights Reserved.