Package com.yahoo.vespa.filedistribution
Class EmptyFileReferenceData
- java.lang.Object
-
- com.yahoo.vespa.filedistribution.FileReferenceData
-
- com.yahoo.vespa.filedistribution.EmptyFileReferenceData
-
public class EmptyFileReferenceData extends FileReferenceData
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.vespa.filedistribution.FileReferenceData
FileReferenceData.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close underlying filesByteBuffer
content()
static FileReferenceData
empty(com.yahoo.config.FileReference fileReference, String filename)
int
nextContent(ByteBuffer bb)
Will provide the next part of the content.long
size()
The size of the content in byteslong
xxhash()
Only guaranteed to be valid after all content has been consumed.-
Methods inherited from class com.yahoo.vespa.filedistribution.FileReferenceData
filename, fileReference, type
-
-
-
-
Method Detail
-
empty
public static FileReferenceData empty(com.yahoo.config.FileReference fileReference, String filename)
-
content
public ByteBuffer content()
- Overrides:
content
in classFileReferenceData
-
nextContent
public int nextContent(ByteBuffer bb)
Description copied from class:FileReferenceData
Will provide the next part of the content.- Specified by:
nextContent
in classFileReferenceData
- Parameters:
bb
- with some available space- Returns:
- Number of bytes transferred.
-
xxhash
public long xxhash()
Description copied from class:FileReferenceData
Only guaranteed to be valid after all content has been consumed.- Specified by:
xxhash
in classFileReferenceData
- Returns:
- xx64hash of content
-
size
public long size()
Description copied from class:FileReferenceData
The size of the content in bytes- Specified by:
size
in classFileReferenceData
- Returns:
- number of bytes
-
close
public void close()
Description copied from class:FileReferenceData
Close underlying files- Specified by:
close
in classFileReferenceData
-
-