Class VerifyingLockFactory
A LockFactory that wraps another LockFactory and verifies that each lock obtain/release is "correct" (never results in two processes holding the lock at the same time). It does this by contacting an external server (LockVerifyServer) to assert that at most one process holds the lock at a time. To use this, you should also run LockVerifyServer on the host & port matching what you pass to the constructor.
Inherited Members
Namespace: Lucene.Net.Store
Assembly: Lucene.Net.dll
Syntax
public class VerifyingLockFactory : LockFactory
Constructors
VerifyingLockFactory(LockFactory, Stream)
Creates a new VerifyingLockFactory instance.
Declaration
public VerifyingLockFactory(LockFactory lf, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
LockFactory | lf | the LockFactory that we are testing |
Stream | stream | the socket's stream input/output to LockVerifyServer |
See Also
Methods
ClearLock(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 override void ClearLock(string lockName)
Parameters
Type | Name | Description |
---|---|---|
string | lockName | name of the lock to be cleared. |
Overrides
See Also
MakeLock(string)
Return a new Lock instance identified by lockName
.
Declaration
public override Lock MakeLock(string lockName)
Parameters
Type | Name | Description |
---|---|---|
string | lockName | name of the lock to be created. |
Returns
Type | Description |
---|---|
Lock |