Module org.apache.lucene.core
Package org.apache.lucene.store
Class MappedByteBufferIndexInputProvider
java.lang.Object
org.apache.lucene.store.MappedByteBufferIndexInputProvider
- All Implemented Interfaces:
MMapDirectory.MMapIndexInputProvider
final class MappedByteBufferIndexInputProvider
extends Object
implements MMapDirectory.MMapIndexInputProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferGuard.BufferCleanerprivate static final Loggerprivate final Stringprivate final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanlongboolean(package private) final ByteBuffer[]map(String resourceDescription, FileChannel fc, int chunkSizePower, boolean preload, long length) Maps a file into a set of buffersprivate static ByteBufferGuard.BufferCleanernewBufferCleaner(MethodHandle unmapper) booleanprivate static ObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.store.MMapDirectory.MMapIndexInputProvider
convertMapFailedIOException
-
Field Details
-
LOG
-
cleaner
-
unmapSupported
private final boolean unmapSupported -
unmapNotSupportedReason
-
-
Constructor Details
-
MappedByteBufferIndexInputProvider
public MappedByteBufferIndexInputProvider()
-
-
Method Details
-
openInput
public IndexInput openInput(Path path, IOContext context, int chunkSizePower, boolean preload) throws IOException - Specified by:
openInputin interfaceMMapDirectory.MMapIndexInputProvider- Throws:
IOException
-
getDefaultMaxChunkSize
public long getDefaultMaxChunkSize()- Specified by:
getDefaultMaxChunkSizein interfaceMMapDirectory.MMapIndexInputProvider
-
isUnmapSupported
public boolean isUnmapSupported()- Specified by:
isUnmapSupportedin interfaceMMapDirectory.MMapIndexInputProvider
-
getUnmapNotSupportedReason
- Specified by:
getUnmapNotSupportedReasonin interfaceMMapDirectory.MMapIndexInputProvider
-
supportsMadvise
public boolean supportsMadvise()- Specified by:
supportsMadvisein interfaceMMapDirectory.MMapIndexInputProvider
-
map
final ByteBuffer[] map(String resourceDescription, FileChannel fc, int chunkSizePower, boolean preload, long length) throws IOException Maps a file into a set of buffers- Throws:
IOException
-
checkUnmapHackSysprop
private static boolean checkUnmapHackSysprop() -
unmapHackImpl
-
newBufferCleaner
-