Fork me on GitHub
  • API

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    LockFactory
    VerifyingLockFactory
    Inherited Members
    LockFactory.m_lockPrefix
    LockFactory.LockPrefix
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    LockVerifyServer
    LockStressTest

    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
    LockFactory.ClearLock(string)
    See Also
    LockVerifyServer
    LockStressTest

    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
    Overrides
    LockFactory.MakeLock(string)
    See Also
    LockVerifyServer
    LockStressTest

    See Also

    LockVerifyServer
    LockStressTest
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.