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
Classes | Public Member Functions | List of all members
Lucene.Net.Store.VerifyingLockFactory Class Reference

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. More...

Inherits Lucene.Net.Store.LockFactory.

Public Member Functions

 VerifyingLockFactory (sbyte id, LockFactory lf, System.String host, int port)
 
override Lock MakeLock (System.String lockName)
 Return a new Lock instance identified by lockName.
 
override void ClearLock (System.String lockName)
 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.
 

Additional Inherited Members

- Properties inherited from Lucene.Net.Store.LockFactory
virtual string LockPrefix [get, set]
 Gets or sets the prefix in use for all locks created in this LockFactory. This is normally called once, when a Directory gets this LockFactory instance. However, you can also call this (after this instance is assigned to a Directory) to override the prefix in use. This is helpful if you're running Lucene on machines that have different mount points for the same shared directory.
 

Detailed Description

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.

See Also
LockVerifyServer
See Also
LockStressTest

Definition at line 38 of file VerifyingLockFactory.cs.

Constructor & Destructor Documentation

Lucene.Net.Store.VerifyingLockFactory.VerifyingLockFactory ( sbyte  id,
LockFactory  lf,
System.String  host,
int  port 
)
Parameters
idshould be a unique id across all clients
lfthe LockFactory that we are testing
hosthost or IP where LockVerifyServer is running
portthe port LockVerifyServer is listening on

Definition at line 141 of file VerifyingLockFactory.cs.

Member Function Documentation

override void Lucene.Net.Store.VerifyingLockFactory.ClearLock ( System.String  lockName)
virtual

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.

Parameters
lockNamename of the lock to be cleared.

Implements Lucene.Net.Store.LockFactory.

Definition at line 157 of file VerifyingLockFactory.cs.

override Lock Lucene.Net.Store.VerifyingLockFactory.MakeLock ( System.String  lockName)
virtual

Return a new Lock instance identified by lockName.

Parameters
lockNamename of the lock to be created.

Implements Lucene.Net.Store.LockFactory.

Definition at line 149 of file VerifyingLockFactory.cs.


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