Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class MockLockFactoryWrapper

    Used by MockDirectoryWrapper to wrap another factory and track open locks.

    Inheritance
    object
    LockFactory
    MockLockFactoryWrapper
    Inherited Members
    LockFactory.m_lockPrefix
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Store
    Assembly: Lucene.Net.TestFramework.dll
    Syntax
    public class MockLockFactoryWrapper : LockFactory

    Constructors

    MockLockFactoryWrapper(MockDirectoryWrapper, LockFactory)

    Used by MockDirectoryWrapper to wrap another factory and track open locks.

    Declaration
    public MockLockFactoryWrapper(MockDirectoryWrapper dir, LockFactory @delegate)
    Parameters
    Type Name Description
    MockDirectoryWrapper dir
    LockFactory delegate

    Properties

    LockPrefix

    Gets or Sets the prefix in use for all locks created in this Lucene.Net.Store.LockFactory. This is normally called once, when a Lucene.Net.Store.Directory gets this Lucene.Net.Store.LockFactory instance. However, you can also call this (after this instance is assigned to a Lucene.Net.Store.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.

    Declaration
    public override string LockPrefix { get; set; }
    Property Value
    Type Description
    string
    Overrides
    Lucene.Net.Store.LockFactory.LockPrefix

    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)

    MakeLock(string)

    Return a new Lucene.Net.Store.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)

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()
    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.