Package org.apache.lucene.store
Class NativePosixUtil
- java.lang.Object
-
- org.apache.lucene.store.NativePosixUtil
-
public final class NativePosixUtil extends java.lang.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 void
advise(java.io.FileDescriptor fd, long offset, long len, int advise)
static int
madvise(java.nio.ByteBuffer buf, int advise)
static java.io.FileDescriptor
open_direct(java.lang.String filename, boolean read)
static int
posix_madvise(java.nio.ByteBuffer buf, int advise)
static long
pread(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
-
-