Class LockFactory
Base class for Locking implementation. Directory uses instances of this class to implement locking.
Lucene uses Native
Special care needs to be taken if you change the locking
implementation: First be certain that no writer is in fact
writing to the index otherwise you can easily corrupt
your index. Be sure to do the Lock
If you suspect that some Lock
Inheritance
Inherited Members
Namespace: Lucene.Net.Store
Assembly: Lucene.Net.dll
Syntax
public abstract class LockFactory
Fields
| Improve this Doc View Sourcem_lockPrefix
Declaration
protected string m_lockPrefix
Field Value
Type | Description |
---|---|
System. |
Properties
| Improve this Doc View SourceLockPrefix
Gets or Sets the prefix in use for all locks created in this
Lock
Declaration
public virtual string LockPrefix { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceClearLock(String)
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.
Declaration
public abstract void ClearLock(string lockName)
Parameters
Type | Name | Description |
---|---|---|
System. |
lockName | name of the lock to be cleared. |
MakeLock(String)
Return a new Lock instance identified by lockName
.
Declaration
public abstract Lock MakeLock(string lockName)
Parameters
Type | Name | Description |
---|---|---|
System. |
lockName | name of the lock to be created. |
Returns
Type | Description |
---|---|
Lock |