Package org.apache.lucene.store
Class NativePosixUtil
- java.lang.Object
-
- org.apache.lucene.store.NativePosixUtil
-
public final class NativePosixUtil extends java.lang.ObjectProvides 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(java.io.FileDescriptor fd, long offset, long len, int advise)static intmadvise(java.nio.ByteBuffer buf, int advise)static java.io.FileDescriptoropen_direct(java.lang.String filename, boolean read)static intposix_madvise(java.nio.ByteBuffer buf, int advise)static longpread(java.io.FileDescriptor fd, long pos, java.nio.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(java.nio.ByteBuffer buf, int advise) throws java.io.IOException- Throws:
java.io.IOException
-
madvise
public static int madvise(java.nio.ByteBuffer buf, int advise) throws java.io.IOException- Throws:
java.io.IOException
-
open_direct
public static java.io.FileDescriptor open_direct(java.lang.String filename, boolean read) throws java.io.IOException- Throws:
java.io.IOException
-
pread
public static long pread(java.io.FileDescriptor fd, long pos, java.nio.ByteBuffer byteBuf) throws java.io.IOException- Throws:
java.io.IOException
-
advise
public static void advise(java.io.FileDescriptor fd, long offset, long len, int advise) throws java.io.IOException- Throws:
java.io.IOException
-
-