Package com.yahoo.vespa.filedistribution
Class FileReferenceData
java.lang.Object
com.yahoo.vespa.filedistribution.FileReferenceData
- Direct Known Subclasses:
EmptyFileReferenceData
,LazyFileReferenceData
Utility class for a file reference with data and metadata
- Author:
- hmusum
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Constructor Summary
ConstructorDescriptionFileReferenceData
(com.yahoo.config.FileReference fileReference, String filename, FileReferenceData.Type type, FileReferenceData.CompressionType compressionType) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
close()
Close underlying filescontent()
filename()
com.yahoo.config.FileReference
abstract int
Will provide the next part of the content.abstract long
size()
The size of the content in bytestoString()
type()
abstract long
xxhash()
Only guaranteed to be valid after all content has been consumed.
-
Constructor Details
-
FileReferenceData
public FileReferenceData(com.yahoo.config.FileReference fileReference, String filename, FileReferenceData.Type type, FileReferenceData.CompressionType compressionType)
-
-
Method Details
-
fileReference
public com.yahoo.config.FileReference fileReference() -
filename
-
type
-
compressionType
-
content
-
nextContent
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
-