Apache Lucene.Net 2.4.0 Class Library API

Lock Members

Lock overview

Public Static Fields

LOCK_OBTAIN_WAIT_FOREVERPass this value to {@link #Obtain(long)} to try forever to obtain the lock.
LOCK_POLL_INTERVALHow long {@link #Obtain(long)} waits, in milliseconds, in between attempts to acquire the lock.

Public Instance Methods

Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object)Gets the Type of the current instance.
IsLockedReturns true if the resource is currently locked. Note that one must still call {@link #Obtain()} before using the resource.
ObtainOverloaded. Attempts to obtain exclusive access and immediately return upon success or failure.
ReleaseReleases exclusive access.
ToString (inherited from Object)Returns a String that represents the current Object.

Protected Instance Constructors

Lock Constructor Initializes a new instance of the Lock class.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

Protected Internal Instance Fields

failureReason If a lock obtain called, this failureReason may be set with the "root cause" Exception as to why the lock was not obtained.

See Also

Lock Class | Lucene.Net.Store Namespace