public class StoreFileMetaData extends java.lang.Object implements Writeable
Writeable.Reader<R>
Modifier and Type | Field and Description |
---|---|
static org.apache.lucene.util.Version |
FIRST_LUCENE_CHECKSUM_VERSION |
Constructor and Description |
---|
StoreFileMetaData(StreamInput in) |
StoreFileMetaData(java.lang.String name,
long length,
java.lang.String checksum) |
StoreFileMetaData(java.lang.String name,
long length,
java.lang.String checksum,
org.apache.lucene.util.Version writtenBy) |
StoreFileMetaData(java.lang.String name,
long length,
java.lang.String checksum,
org.apache.lucene.util.Version writtenBy,
org.apache.lucene.util.BytesRef hash) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
checksum()
Returns a string representation of the files checksum.
|
org.apache.lucene.util.BytesRef |
hash()
Returns a variable length hash of the file represented by this metadata object.
|
boolean |
isSame(StoreFileMetaData other)
Returns
true iff the length and the checksums are the same. |
long |
length()
the actual file size on "disk", if compressed, the compressed size
|
java.lang.String |
name()
Returns the name of this file
|
StoreFileMetaData |
readFrom(StreamInput in)
Reads an object of this type from the provided StreamInput.
|
java.lang.String |
toString() |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
org.apache.lucene.util.Version |
writtenBy()
Returns the Lucene version this file has been written by or
null if unknown |
public static final org.apache.lucene.util.Version FIRST_LUCENE_CHECKSUM_VERSION
public StoreFileMetaData(StreamInput in) throws java.io.IOException
java.io.IOException
public StoreFileMetaData(java.lang.String name, long length, java.lang.String checksum)
public StoreFileMetaData(java.lang.String name, long length, java.lang.String checksum, org.apache.lucene.util.Version writtenBy)
public StoreFileMetaData(java.lang.String name, long length, java.lang.String checksum, org.apache.lucene.util.Version writtenBy, org.apache.lucene.util.BytesRef hash)
public java.lang.String name()
public long length()
public java.lang.String checksum()
public boolean isSame(StoreFileMetaData other)
true
iff the length and the checksums are the same. otherwise false
public java.lang.String toString()
toString
in class java.lang.Object
public StoreFileMetaData readFrom(StreamInput in) throws java.io.IOException
StreamableReader
readFrom
in interface StreamableReader
readFrom
in interface Writeable
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
public org.apache.lucene.util.Version writtenBy()
null
if unknownpublic org.apache.lucene.util.BytesRef hash()