Class NativePosixUtil


  • public final class NativePosixUtil
    extends java.lang.Object
    Provides JNI access to native methods such as madvise() for NativeUnixDirectory
    • 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)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NativePosixUtil

        public NativePosixUtil()
    • 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