Writeable.Reader<V>, Writeable.Writer<V>
Constructor and Description |
---|
StoreFileMetaData(StreamInput in)
Read from a stream.
|
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
|
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 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 StoreFileMetaData(StreamInput in) throws java.io.IOException
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
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 org.apache.lucene.util.Version writtenBy()
null
if unknownpublic org.apache.lucene.util.BytesRef hash()