Class FileHandle

    • Field Detail

      • onDiskLength

        public final long onDiskLength
    • Method Detail

      • file

        public File file()
        Returns:
        file this factory is referencing
      • path

        public java.lang.String path()
      • dataLength

        public long dataLength()
      • sharedCopy

        public FileHandle sharedCopy()
        Returns:
        a new instance of the object representing the same state and backed by the same underlying resources. Coordinates with the original (and other instances) when the underlying resource should be closed. Throws an exception if the shared resource has already been closed.
      • createReader

        public RandomAccessReader createReader​(com.google.common.util.concurrent.RateLimiter limiter)
        Create RandomAccessReader with configured method of reading content of the file. Reading from file will be rate limited by given RateLimiter.
        Parameters:
        limiter - RateLimiter to use for rate limiting read
        Returns:
        RandomAccessReader for the file
      • createReader

        public FileDataInput createReader​(long position)
      • dropPageCache

        public void dropPageCache​(long before)
        Drop page cache from start to given before.
        Parameters:
        before - uncompressed position from start of the file to be dropped from cache. if 0, to end of file.
      • instantiateRebufferer

        public Rebufferer instantiateRebufferer​(com.google.common.util.concurrent.RateLimiter limiter)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object