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
FileSwitchDirectory
Implements
System.IDisposable
Inherited Members
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)
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
|
Improve this Doc
View Source
SecondaryDir
Return the secondary directory
Declaration
public virtual Directory SecondaryDir { get; }
Property Value
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
Overrides
|
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
Overrides
|
Improve this Doc
View Source
DeleteFile(String)
Declaration
public override void DeleteFile(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Overrides
|
Improve this Doc
View Source
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Overrides
|
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
|
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
|
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
|
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
Overrides
|
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
Implements
System.IDisposable