Show / Hide Table of Contents

    Class SimpleFSLockFactory

    Implements LockFactory using (writes the file with UTF8 encoding and no byte order mark).

    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 LockFactory change to all Lucene instances and clean up all leftover lock files before starting the new configuration for the first time. Different implementations can not work together!

    If you suspect that this or any other LockFactory is not working properly in your environment, you can easily test it by using VerifyingLockFactory, LockVerifyServer and LockStressTest.

    Inheritance
    System.Object
    LockFactory
    FSLockFactory
    SimpleFSLockFactory
    Inherited Members
    FSLockFactory.m_lockDir
    FSLockFactory.SetLockDir(DirectoryInfo)
    FSLockFactory.LockDir
    FSLockFactory.ToString()
    LockFactory.m_lockPrefix
    LockFactory.LockPrefix
    Namespace: Lucene.Net.Store
    Assembly: Lucene.Net.dll
    Syntax
    public class SimpleFSLockFactory : FSLockFactory

    Constructors

    | Improve this Doc View Source

    SimpleFSLockFactory()

    Create a SimpleFSLockFactory instance, with null (unset) lock directory. When you pass this factory to a FSDirectory subclass, the lock directory is automatically set to the directory itself. Be sure to create one instance for each directory your create!

    Declaration
    public SimpleFSLockFactory()
    | Improve this Doc View Source

    SimpleFSLockFactory(DirectoryInfo)

    Instantiate using the provided directory (as a instance).

    Declaration
    public SimpleFSLockFactory(DirectoryInfo lockDir)
    Parameters
    Type Name Description
    DirectoryInfo lockDir

    where lock files should be created.

    | Improve this Doc View Source

    SimpleFSLockFactory(String)

    Instantiate using the provided directory name ().

    Declaration
    public SimpleFSLockFactory(string lockDirName)
    Parameters
    Type Name Description
    System.String lockDirName

    where lock files should be created.

    Methods

    | Improve this Doc View Source

    ClearLock(String)

    Declaration
    public override void ClearLock(string lockName)
    Parameters
    Type Name Description
    System.String lockName
    Overrides
    LockFactory.ClearLock(String)
    | Improve this Doc View Source

    MakeLock(String)

    Declaration
    public override Lock MakeLock(string lockName)
    Parameters
    Type Name Description
    System.String lockName
    Returns
    Type Description
    Lock
    Overrides
    LockFactory.MakeLock(String)

    See Also

    LockFactory
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)