Package org.apache.lucene.store
Class NativePosixUtil
- java.lang.Object
-
- org.apache.lucene.store.NativePosixUtil
-
public final class NativePosixUtil extends Object
Provides JNI access to native methods such as madvise() forNativeUnixDirectory
-
-
Constructor Summary
Constructors Constructor Description NativePosixUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidadvise(FileDescriptor fd, long offset, long len, int advise)static intmadvise(ByteBuffer buf, int advise)static FileDescriptoropen_direct(String filename, boolean read)static intposix_madvise(ByteBuffer buf, int advise)static longpread(FileDescriptor fd, long pos, ByteBuffer byteBuf)
-
-
-
Field Detail
-
NORMAL
public static final int NORMAL
- See Also:
- Constant Field Values
-
SEQUENTIAL
public static final int SEQUENTIAL
- See Also:
- Constant Field Values
-
RANDOM
public static final int RANDOM
- See Also:
- Constant Field Values
-
WILLNEED
public static final int WILLNEED
- See Also:
- Constant Field Values
-
DONTNEED
public static final int DONTNEED
- See Also:
- Constant Field Values
-
NOREUSE
public static final int NOREUSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
posix_madvise
public static int posix_madvise(ByteBuffer buf, int advise) throws IOException
- Throws:
IOException
-
madvise
public static int madvise(ByteBuffer buf, int advise) throws IOException
- Throws:
IOException
-
open_direct
public static FileDescriptor open_direct(String filename, boolean read) throws IOException
- Throws:
IOException
-
pread
public static long pread(FileDescriptor fd, long pos, ByteBuffer byteBuf) throws IOException
- Throws:
IOException
-
advise
public static void advise(FileDescriptor fd, long offset, long len, int advise) throws IOException
- Throws:
IOException
-
-