Class FileReferenceData

java.lang.Object
com.yahoo.vespa.filedistribution.FileReferenceData
Direct Known Subclasses:
EmptyFileReferenceData, LazyFileReferenceData

public abstract class FileReferenceData extends Object
Utility class for a file reference with data and metadata
Author:
hmusum
  • Constructor Details

  • Method Details

    • fileReference

      public com.yahoo.config.FileReference fileReference()
    • filename

      public String filename()
    • type

      public FileReferenceData.Type type()
    • compressionType

      public FileReferenceData.CompressionType compressionType()
    • content

      public ByteBuffer content()
    • nextContent

      public abstract int nextContent(ByteBuffer bb)
      Will provide the next part of the content.
      Parameters:
      bb - with some available space
      Returns:
      Number of bytes transferred.
    • xxhash

      public abstract long xxhash()
      Only guaranteed to be valid after all content has been consumed.
      Returns:
      xxhash64 of content
    • size

      public abstract long size()
      The size of the content in bytes
      Returns:
      number of bytes
    • close

      public abstract void close()
      Close underlying files
    • toString

      public String toString()
      Overrides:
      toString in class Object