Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class FileSwitchDirectory

    Expert: A Directory instance that switches files between two other Directory instances.

    Files with the specified extensions are placed in the primary directory; others are placed in the secondary directory. The provided ISet{string} must not change once passed to this class, and must allow multiple threads to call contains at once.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    System.Object
    Directory
    BaseDirectory
    FileSwitchDirectory
    Implements
    System.IDisposable
    Inherited Members
    BaseDirectory.IsOpen
    BaseDirectory.m_lockFactory
    BaseDirectory.MakeLock(String)
    BaseDirectory.ClearLock(String)
    BaseDirectory.SetLockFactory(LockFactory)
    BaseDirectory.LockFactory
    BaseDirectory.EnsureOpen()
    Directory.OpenChecksumInput(String, IOContext)
    Directory.Dispose()
    Directory.GetLockID()
    Directory.ToString()
    Directory.Copy(Directory, String, String, IOContext)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Lucene.Net.Store
    Assembly: Lucene.Net.dll
    Syntax
    public class FileSwitchDirectory : BaseDirectory, IDisposable

    Constructors

    | Improve this Doc View Source

    FileSwitchDirectory(ISet<String>, Directory, Directory, Boolean)

    Declaration
    public FileSwitchDirectory(ISet<string> primaryExtensions, Directory primaryDir, Directory secondaryDir, bool doClose)
    Parameters
    Type Name Description
    System.Collections.Generic.ISet<System.String> primaryExtensions
    Directory primaryDir
    Directory secondaryDir
    System.Boolean doClose

    Properties

    | Improve this Doc View Source

    PrimaryDir

    Return the primary directory

    Declaration
    public virtual Directory PrimaryDir { get; }
    Property Value
    Type Description
    Directory
    | Improve this Doc View Source

    SecondaryDir

    Return the secondary directory

    Declaration
    public virtual Directory SecondaryDir { get; }
    Property Value
    Type Description
    Directory

    Methods

    | Improve this Doc View Source

    CreateOutput(String, IOContext)

    Declaration
    public override IndexOutput CreateOutput(string name, IOContext context)
    Parameters
    Type Name Description
    System.String name
    IOContext context
    Returns
    Type Description
    IndexOutput
    Overrides
    Directory.CreateOutput(String, IOContext)
    | Improve this Doc View Source

    CreateSlicer(String, IOContext)

    Declaration
    public override Directory.IndexInputSlicer CreateSlicer(string name, IOContext context)
    Parameters
    Type Name Description
    System.String name
    IOContext context
    Returns
    Type Description
    Directory.IndexInputSlicer
    Overrides
    Directory.CreateSlicer(String, IOContext)
    | Improve this Doc View Source

    DeleteFile(String)

    Declaration
    public override void DeleteFile(string name)
    Parameters
    Type Name Description
    System.String name
    Overrides
    Directory.DeleteFile(String)
    | Improve this Doc View Source

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    Directory.Dispose(Boolean)
    | Improve this Doc View Source

    FileExists(String)

    Declaration
    [Obsolete("this method will be removed in 5.0")]
    public override bool FileExists(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    System.Boolean
    Overrides
    Directory.FileExists(String)
    | Improve this Doc View Source

    FileLength(String)

    Declaration
    public override long FileLength(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    System.Int64
    Overrides
    Directory.FileLength(String)
    | Improve this Doc View Source

    GetExtension(String)

    Utility method to return a file's extension.

    Declaration
    public static string GetExtension(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    ListAll()

    Declaration
    public override string[] ListAll()
    Returns
    Type Description
    System.String[]
    Overrides
    Directory.ListAll()
    | Improve this Doc View Source

    OpenInput(String, IOContext)

    Declaration
    public override IndexInput OpenInput(string name, IOContext context)
    Parameters
    Type Name Description
    System.String name
    IOContext context
    Returns
    Type Description
    IndexInput
    Overrides
    Directory.OpenInput(String, IOContext)
    | Improve this Doc View Source

    Sync(ICollection<String>)

    Declaration
    public override void Sync(ICollection<string> names)
    Parameters
    Type Name Description
    System.Collections.Generic.ICollection<System.String> names
    Overrides
    Directory.Sync(ICollection<String>)

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 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.