Record Class MigrationChunkTransfer.TransferChunk
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.MigrationChunkTransfer.TransferChunk
- Enclosing class:
MigrationChunkTransfer
public static record MigrationChunkTransfer.TransferChunk(int partitionId, long chunkIndex, byte[] data, long checksum, long bytesInChunk)
extends Record
Record representing a single chunk with metadata.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionTransferChunk(int partitionId, long chunkIndex, byte[] data, long checksum, long bytesInChunk) Creates an instance of aTransferChunkrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thebytesInChunkrecord component.longchecksum()Returns the value of thechecksumrecord component.longReturns the value of thechunkIndexrecord component.byte[]data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepartitionIdrecord component.final StringtoString()Returns a string representation of this record class.boolean
-
Constructor Details
-
TransferChunk
public TransferChunk(int partitionId, long chunkIndex, byte[] data, long checksum, long bytesInChunk) Creates an instance of aTransferChunkrecord class.- Parameters:
partitionId- the value for thepartitionIdrecord componentchunkIndex- the value for thechunkIndexrecord componentdata- the value for thedatarecord componentchecksum- the value for thechecksumrecord componentbytesInChunk- the value for thebytesInChunkrecord component
-
-
Method Details
-
data
public byte[] data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
verifyCrc32
public boolean verifyCrc32() -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
partitionId
public int partitionId()Returns the value of thepartitionIdrecord component.- Returns:
- the value of the
partitionIdrecord component
-
chunkIndex
public long chunkIndex()Returns the value of thechunkIndexrecord component.- Returns:
- the value of the
chunkIndexrecord component
-
checksum
public long checksum()Returns the value of thechecksumrecord component.- Returns:
- the value of the
checksumrecord component
-
bytesInChunk
public long bytesInChunk()Returns the value of thebytesInChunkrecord component.- Returns:
- the value of the
bytesInChunkrecord component
-