The Lock type exposes the following members.
Constructors
Methods
| Name | Description | |
|---|---|---|
| Equals | (Inherited from Object.) | |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IsLocked | Returns true if the resource is currently locked. Note that one must
still call {@link #Obtain()} before using the resource.
| |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| Obtain()()()() | Attempts to obtain exclusive access and immediately return
upon success or failure.
| |
| Obtain(Int64) | Attempts to obtain an exclusive lock within amount of
time given. Polls once per {@link #LOCK_POLL_INTERVAL}
(currently 1000) milliseconds until lockWaitTimeout is
passed.
| |
| Release | Releases exclusive access. | |
| ToString | (Inherited from Object.) |
Fields
| Name | Description | |
|---|---|---|
| failureReason | If a lock obtain called, this failureReason may be set
with the "root cause" Exception as to why the lock was
not obtained.
| |
| LOCK_OBTAIN_WAIT_FOREVER | Pass this value to {@link #Obtain(long)} to try
forever to obtain the lock.
| |
| LOCK_POLL_INTERVAL | How long {@link #Obtain(long)} waits, in milliseconds,
in between attempts to acquire the lock.
|