Package org.apache.lucene.replicator.nrt
Record Class FileMetaData
java.lang.Object
java.lang.Record
org.apache.lucene.replicator.nrt.FileMetaData
- Record Components:
header
- Header of the file- Footer of the file
length
- Length of the filechecksum
- Used to ensure no bit flips when copying the file:
Holds metadata details about a single file that we use to confirm two files (one remote, one
local) are in fact "identical". Header and footer of the file must be identical between primary
and replica to consider the files equal:
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
ConstructorsConstructorDescriptionFileMetaData
(byte[] header, byte[] footer, long length, long checksum) Creates an instance of aFileMetaData
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
checksum()
Returns the value of thechecksum
record component.final boolean
Indicates whether some other object is "equal to" this one.byte[]
footer()
Returns the value of thefooter
record component.final int
hashCode()
Returns a hash code value for this object.byte[]
header()
Returns the value of theheader
record component.long
length()
Returns the value of thelength
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
FileMetaData
public FileMetaData(byte[] header, byte[] footer, long length, long checksum) Creates an instance of aFileMetaData
record class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
header
public byte[] header()Returns the value of theheader
record component.- Returns:
- the value of the
header
record component
-
length
public long length()Returns the value of thelength
record component.- Returns:
- the value of the
length
record component
-
checksum
public long checksum()Returns the value of thechecksum
record component.- Returns:
- the value of the
checksum
record component
-