Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Public Member Functions | List of all members
Lucene.Net.Store.SingleInstanceLock Class Reference

Inherits Lucene.Net.Store.Lock.

Public Member Functions

 SingleInstanceLock (System.Collections.Generic.HashSet< string > locks, System.String lockName)
 
override bool Obtain ()
 Attempts to obtain exclusive access and immediately return upon success or failure.
 
override void Release ()
 Releases exclusive access.
 
override bool IsLocked ()
 Returns true if the resource is currently locked. Note that one must still call Obtain() before using the resource.
 
override System.String ToString ()
 
- Public Member Functions inherited from Lucene.Net.Store.Lock
virtual bool Obtain (long lockWaitTimeout)
 Attempts to obtain an exclusive lock within amount of time given. Polls once per LOCK_POLL_INTERVAL (currently 1000) milliseconds until lockWaitTimeout is passed.
 

Additional Inherited Members

- Public Attributes inherited from Lucene.Net.Store.Lock
const long LOCK_OBTAIN_WAIT_FOREVER = - 1
 Pass this value to Obtain(long) to try forever to obtain the lock.
 
- Static Public Attributes inherited from Lucene.Net.Store.Lock
static long LOCK_POLL_INTERVAL = 1000
 How long Obtain(long) waits, in milliseconds, in between attempts to acquire the lock.
 

Detailed Description

Definition at line 60 of file SingleInstanceLockFactory.cs.

Constructor & Destructor Documentation

Lucene.Net.Store.SingleInstanceLock.SingleInstanceLock ( System.Collections.Generic.HashSet< string >  locks,
System.String  lockName 
)

Definition at line 66 of file SingleInstanceLockFactory.cs.

Member Function Documentation

override bool Lucene.Net.Store.SingleInstanceLock.IsLocked ( )
virtual

Returns true if the resource is currently locked. Note that one must still call Obtain() before using the resource.

Implements Lucene.Net.Store.Lock.

Definition at line 94 of file SingleInstanceLockFactory.cs.

override bool Lucene.Net.Store.SingleInstanceLock.Obtain ( )
virtual

Attempts to obtain exclusive access and immediately return upon success or failure.

Returns
true iff exclusive access is obtained

Implements Lucene.Net.Store.Lock.

Definition at line 72 of file SingleInstanceLockFactory.cs.

override void Lucene.Net.Store.SingleInstanceLock.Release ( )
virtual

Releases exclusive access.

Implements Lucene.Net.Store.Lock.

Definition at line 86 of file SingleInstanceLockFactory.cs.

override System.String Lucene.Net.Store.SingleInstanceLock.ToString ( )

Definition at line 102 of file SingleInstanceLockFactory.cs.


The documentation for this class was generated from the following file: