Record Class ChunkSessionInformation
java.lang.Object
java.lang.Record
eu.cloudnetservice.driver.network.chunk.data.ChunkSessionInformation
- Record Components:
chunkSize- the size of data transferred in each chunk, should always be the exact amount of bytes.sessionUniqueId- the unique id of the transfer session, for identification reasons.transferChannel- the name of the channel the data is transferred in, for identification reasons.transferInformation- additional information for the transfer handler to handle the chunks correctly.
public record ChunkSessionInformation(int chunkSize, @NonNull UUID sessionUniqueId, @NonNull String transferChannel, @NonNull DataBuf transferInformation)
extends Record
Contains all needed information for a chunked data transfer to be initialized. The transfer information in this
object are there to allow writes of additional information needed for the transfer to work, for example the target
file name.
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thechunkSizerecord component.The field for thesessionUniqueIdrecord component.The field for thetransferChannelrecord component.The field for thetransferInformationrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thechunkSizerecord component.booleaninthashCode()Returns the value of thesessionUniqueIdrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransferChannelrecord component.Returns the value of thetransferInformationrecord component.
-
Field Details
-
chunkSize
private final int chunkSizeThe field for thechunkSizerecord component. -
sessionUniqueId
The field for thesessionUniqueIdrecord component. -
transferChannel
The field for thetransferChannelrecord component. -
transferInformation
The field for thetransferInformationrecord component.
-
-
Constructor Details
-
ChunkSessionInformation
public ChunkSessionInformation(int chunkSize, @NonNull @NonNull UUID sessionUniqueId, @NonNull @NonNull String transferChannel, @NonNull @NonNull DataBuf transferInformation) Creates an instance of aChunkSessionInformationrecord class.- Parameters:
chunkSize- the value for thechunkSizerecord componentsessionUniqueId- the value for thesessionUniqueIdrecord componenttransferChannel- the value for thetransferChannelrecord componenttransferInformation- the value for thetransferInformationrecord component
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
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. -
chunkSize
public int chunkSize()Returns the value of thechunkSizerecord component.- Returns:
- the value of the
chunkSizerecord component
-
sessionUniqueId
Returns the value of thesessionUniqueIdrecord component.- Returns:
- the value of the
sessionUniqueIdrecord component
-
transferChannel
Returns the value of thetransferChannelrecord component.- Returns:
- the value of the
transferChannelrecord component
-
transferInformation
Returns the value of thetransferInformationrecord component.- Returns:
- the value of the
transferInformationrecord component
-