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.BufferCleaner
private static final Logger
private final String
private final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
long
boolean
(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.BufferCleaner
newBufferCleaner
(MethodHandle unmapper) boolean
private static Object
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
openInput
in interfaceMMapDirectory.MMapIndexInputProvider
- Throws:
IOException
-
getDefaultMaxChunkSize
public long getDefaultMaxChunkSize()- Specified by:
getDefaultMaxChunkSize
in interfaceMMapDirectory.MMapIndexInputProvider
-
isUnmapSupported
public boolean isUnmapSupported()- Specified by:
isUnmapSupported
in interfaceMMapDirectory.MMapIndexInputProvider
-
getUnmapNotSupportedReason
- Specified by:
getUnmapNotSupportedReason
in interfaceMMapDirectory.MMapIndexInputProvider
-
supportsMadvise
public boolean supportsMadvise()- Specified by:
supportsMadvise
in 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
-