The MMapDirectory type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MMapDirectory(DirectoryInfo) | Create a new MMapDirectory for the named location and the default lock factory.
| |
MMapDirectory(FileInfo) | Obsolete. Create a new MMapDirectory for the named location and the default lock factory.
| |
MMapDirectory(DirectoryInfo, LockFactory) | Create a new MMapDirectory for the named location.
| |
MMapDirectory(FileInfo, LockFactory) | Obsolete. Create a new MMapDirectory for the named location.
|
Methods
Name | Description | |
---|---|---|
ClearLock | 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.
(Inherited from Directory.) | |
Close | Closes the store to future operations. (Inherited from FSDirectory.) | |
CreateOutput | Creates an IndexOutput for the file with the given name. (Overrides FSDirectory..::..CreateOutput(String).) | |
DeleteFile | Removes an existing file in the directory. (Inherited from FSDirectory.) | |
Dispose |
.NET
(Inherited from FSDirectory.) | |
EnsureOpen | (Inherited from Directory.) | |
Equals | (Inherited from Object.) | |
FileExists | Returns true iff a file with the given name exists. (Inherited from FSDirectory.) | |
FileLength | Returns the length in bytes of a file in the directory. (Inherited from FSDirectory.) | |
FileModified(String) | Returns the time the named file was last modified. (Inherited from FSDirectory.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetDirectory()()()() | (Inherited from FSDirectory.) | |
GetFile | Obsolete. (Inherited from FSDirectory.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetLockFactory | Get the LockFactory that this Directory instance is
using for its locking implementation. Note that this
may be null for Directory implementations that provide
their own locking implementation.
(Inherited from Directory.) | |
GetLockID | (Inherited from FSDirectory.) | |
GetMaxChunkSize | Returns the current mmap chunk size. | |
GetReadChunkSize | The maximum number of bytes to read at once from the
underlying file during {@link IndexInput#readBytes}.
(Inherited from FSDirectory.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUseUnmap | Returns CopyC# true | |
InitOutput | Initializes the directory to create a new file with the given name.
This method should be used in {@link #createOutput}.
(Inherited from FSDirectory.) | |
List | Obsolete. (Inherited from FSDirectory.) | |
ListAll()()()() | Lists all files (not subdirectories) in the
directory.
(Inherited from FSDirectory.) | |
MakeLock | Construct a {@link Lock}. (Inherited from Directory.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OpenInput(String) | (Inherited from FSDirectory.) | |
OpenInput(String, Int32) | Creates an IndexInput for the file with the given name. (Overrides FSDirectory..::..OpenInput(String, Int32).) | |
RenameFile | Obsolete. Renames an existing file in the directory.
Warning: This is not atomic.
(Inherited from FSDirectory.) | |
SetLockFactory | Set the LockFactory that this Directory instance should
use for its locking implementation. Each * instance of
LockFactory should only be used for one directory (ie,
do not share a single instance across multiple
Directories).
(Inherited from Directory.) | |
SetMaxChunkSize | Sets the maximum chunk size (default is {@link Integer#MAX_VALUE} for
64 bit JVMs and 256 MiBytes for 32 bit JVMs) used for memory mapping.
Especially on 32 bit platform, the address space can be very fragmented,
so large index files cannot be mapped.
Using a lower chunk size makes the directory implementation a little
bit slower (as the correct chunk must be resolved on each seek)
but the chance is higher that mmap does not fail. On 64 bit
Java platforms, this parameter should always be {@link Integer#MAX_VALUE},
as the adress space is big enough.
| |
SetReadChunkSize | Sets the maximum number of bytes read at once from the
underlying file during {@link IndexInput#readBytes}.
The default value is {@link #DEFAULT_READ_CHUNK_SIZE};
This was introduced due to Sun
JVM Bug 6478546, which throws an incorrect
OutOfMemoryError when attempting to read too many bytes
at once. It only happens on 32bit JVMs with a large
maximum heap size.Changes to this value will not impact any
already-opened {@link IndexInput}s. You should call
this before attempting to open an index on the
directory.NOTE: This value should be as large as
possible to reduce any possible performance impact. If
you still encounter an incorrect OutOfMemoryError,
trying lowering the chunk size. (Inherited from FSDirectory.) | |
SetUseUnmap | This method enables the workaround for unmapping the buffers
from address space after closing {@link IndexInput}, that is
mentioned in the bug report. This hack may fail on non-Sun JVMs.
It forcefully unmaps the buffer on close by using
an undocumented internal cleanup functionality.
NOTE: Enabling this is completely unsupported
by Java and may lead to JVM crashs if CopyC# IndexInput | |
Sync | (Inherited from FSDirectory.) | |
ToString | For debug output. (Inherited from FSDirectory.) | |
TouchFile | Set the modified time of an existing file to now. (Inherited from FSDirectory.) |
Fields
Name | Description | |
---|---|---|
directory | The underlying filesystem directory (Inherited from FSDirectory.) | |
isOpen | (Inherited from Directory.) | |
lockFactory | Holds the LockFactory instance (implements locking for
this Directory instance).
(Inherited from Directory.) | |
UNMAP_SUPPORTED | CopyC# true |
Properties
Name | Description | |
---|---|---|
isOpen_ForNUnit | (Inherited from Directory.) |