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 java.lang.Object implements MMapDirectory.MMapIndexInputProvider
-
-
Field Summary
Fields Modifier and Type Field Description private ByteBufferGuard.BufferCleaner
cleaner
private static java.util.logging.Logger
LOG
private java.lang.String
unmapNotSupportedReason
private boolean
unmapSupported
-
Constructor Summary
Constructors Constructor Description MappedByteBufferIndexInputProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static boolean
checkUnmapHackSysprop()
long
getDefaultMaxChunkSize()
java.lang.String
getUnmapNotSupportedReason()
boolean
isUnmapSupported()
(package private) java.nio.ByteBuffer[]
map(java.lang.String resourceDescription, java.nio.channels.FileChannel fc, int chunkSizePower, boolean preload, long length)
Maps a file into a set of buffersprivate static ByteBufferGuard.BufferCleaner
newBufferCleaner(java.lang.invoke.MethodHandle unmapper)
IndexInput
openInput(java.nio.file.Path path, IOContext context, int chunkSizePower, boolean preload)
boolean
supportsMadvise()
private static java.lang.Object
unmapHackImpl()
-
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 Detail
-
LOG
private static final java.util.logging.Logger LOG
-
cleaner
private final ByteBufferGuard.BufferCleaner cleaner
-
unmapSupported
private final boolean unmapSupported
-
unmapNotSupportedReason
private final java.lang.String unmapNotSupportedReason
-
-
Method Detail
-
openInput
public IndexInput openInput(java.nio.file.Path path, IOContext context, int chunkSizePower, boolean preload) throws java.io.IOException
- Specified by:
openInput
in interfaceMMapDirectory.MMapIndexInputProvider
- Throws:
java.io.IOException
-
getDefaultMaxChunkSize
public long getDefaultMaxChunkSize()
- Specified by:
getDefaultMaxChunkSize
in interfaceMMapDirectory.MMapIndexInputProvider
-
isUnmapSupported
public boolean isUnmapSupported()
- Specified by:
isUnmapSupported
in interfaceMMapDirectory.MMapIndexInputProvider
-
getUnmapNotSupportedReason
public java.lang.String getUnmapNotSupportedReason()
- Specified by:
getUnmapNotSupportedReason
in interfaceMMapDirectory.MMapIndexInputProvider
-
supportsMadvise
public boolean supportsMadvise()
- Specified by:
supportsMadvise
in interfaceMMapDirectory.MMapIndexInputProvider
-
map
final java.nio.ByteBuffer[] map(java.lang.String resourceDescription, java.nio.channels.FileChannel fc, int chunkSizePower, boolean preload, long length) throws java.io.IOException
Maps a file into a set of buffers- Throws:
java.io.IOException
-
checkUnmapHackSysprop
private static boolean checkUnmapHackSysprop()
-
unmapHackImpl
private static java.lang.Object unmapHackImpl()
-
newBufferCleaner
private static ByteBufferGuard.BufferCleaner newBufferCleaner(java.lang.invoke.MethodHandle unmapper)
-
-