Class PageCacheUtil


  • public final class PageCacheUtil
    extends java.lang.Object
    Native I/O operations.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void bestEffortRemoveFromPageCache​(int fd, long offset, long len)
      Remove pages from the file system page cache when they won't be accessed again.
      static int getSysFileDescriptor​(java.io.FileDescriptor descriptor)
      Get system file descriptor (int) from FileDescriptor object.
      • Methods inherited from class java.lang.Object

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

      • getSysFileDescriptor

        public static int getSysFileDescriptor​(java.io.FileDescriptor descriptor)
        Get system file descriptor (int) from FileDescriptor object.
        Parameters:
        descriptor - - FileDescriptor object to get fd from
        Returns:
        file descriptor, -1 or error
      • bestEffortRemoveFromPageCache

        public static void bestEffortRemoveFromPageCache​(int fd,
                                                         long offset,
                                                         long len)
        Remove pages from the file system page cache when they won't be accessed again.
        Parameters:
        fd - The file descriptor of the source file.
        offset - The offset within the file.
        len - The length to be flushed.