Apache Lucene.Net 2.4.0 Class Library API

Lock.Obtain Method (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.

public virtual bool Obtain(
   long lockWaitTimeout
);

Parameters

lockWaitTimeout
length of time to wait in milliseconds or {@link #LOCK_OBTAIN_WAIT_FOREVER} to retry forever

Return Value

true if lock was obtained

See Also

Lock Class | Lucene.Net.Store Namespace | Lock.Obtain Overload List