Class PageCacheUtil

java.lang.Object
org.apache.bookkeeper.util.PageCacheUtil

public final class PageCacheUtil extends Object
Native I/O operations.
  • Method Details

    • getSysFileDescriptor

      public static int getSysFileDescriptor(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.