Package com.yahoo.io

Class NativeIO


  • public class NativeIO
    extends java.lang.Object
    Provides functionality only possible through native C library.
    • Constructor Summary

      Constructors 
      Constructor Description
      NativeIO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dropFileFromCache​(java.io.File file)
      Will hint the OS that this is will not be accessed again and should hence be dropped from the buffer cache.
      void dropFileFromCache​(java.io.FileDescriptor fd)
      Will hint the OS that this is will not be accessed again and should hence be dropped from the buffer cache.
      void dropPartialFileFromCache​(java.io.FileDescriptor fd, long offset, long len, boolean sync)
      Will hint the OS that data read so far will not be accessed again and should hence be dropped from the buffer cache.
      java.lang.Throwable getError()  
      boolean valid()  
      • Methods inherited from class java.lang.Object

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

      • NativeIO

        public NativeIO()
    • Method Detail

      • valid

        public boolean valid()
      • getError

        public java.lang.Throwable getError()
      • dropPartialFileFromCache

        public void dropPartialFileFromCache​(java.io.FileDescriptor fd,
                                             long offset,
                                             long len,
                                             boolean sync)
        Will hint the OS that data read so far will not be accessed again and should hence be dropped from the buffer cache.
        Parameters:
        fd - The file descriptor to drop from buffer cache.
      • dropFileFromCache

        public void dropFileFromCache​(java.io.FileDescriptor fd)
        Will hint the OS that this is will not be accessed again and should hence be dropped from the buffer cache.
        Parameters:
        fd - The file descriptor to drop from buffer cache.
      • dropFileFromCache

        public void dropFileFromCache​(java.io.File file)
        Will hint the OS that this is will not be accessed again and should hence be dropped from the buffer cache.
        Parameters:
        file - File to drop from buffer cache