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 final String
private final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> T
doPrivileged
(PrivilegedAction<T> action) 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) 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
-
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, boolean useUnmapHack) 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
-
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
-
doPrivileged
-
unmapHackImpl
-
newBufferCleaner
-