Record Class FileSystemSpooledSegmentHandle
java.lang.Object
java.lang.Record
io.trino.spooling.filesystem.FileSystemSpooledSegmentHandle
- All Implemented Interfaces:
io.trino.spi.protocol.SpooledSegmentHandle
public record FileSystemSpooledSegmentHandle(String encoding, byte[] uuid, Optional<EncryptionKey> encryptionKey)
extends Record
implements io.trino.spi.protocol.SpooledSegmentHandle
-
Constructor Summary
ConstructorsConstructorDescriptionFileSystemSpooledSegmentHandle(String encoding, byte[] uuid, Optional<EncryptionKey> encryptionKey) Creates an instance of aFileSystemSpooledSegmentHandlerecord class. -
Method Summary
Modifier and TypeMethodDescriptionencoding()Returns the value of theencodingrecord component.Returns the value of theencryptionKeyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Storage identifiers are ULIDs which are ordered lexicographically by the time of the expiration.random(Random random, io.trino.spi.protocol.SpoolingContext context, Instant expireAt, Optional<EncryptionKey> encryptionKey) toString()Returns a string representation of this record class.byte[]uuid()Returns the value of theuuidrecord component.
-
Constructor Details
-
FileSystemSpooledSegmentHandle
public FileSystemSpooledSegmentHandle(String encoding, byte[] uuid, Optional<EncryptionKey> encryptionKey) Creates an instance of aFileSystemSpooledSegmentHandlerecord class.- Parameters:
encoding- the value for theencodingrecord componentuuid- the value for theuuidrecord componentencryptionKey- the value for theencryptionKeyrecord component
-
-
Method Details
-
random
public static FileSystemSpooledSegmentHandle random(Random random, io.trino.spi.protocol.SpoolingContext context, Instant expireAt) -
random
public static FileSystemSpooledSegmentHandle random(Random random, io.trino.spi.protocol.SpoolingContext context, Instant expireAt, Optional<EncryptionKey> encryptionKey) -
expirationTime
- Specified by:
expirationTimein interfaceio.trino.spi.protocol.SpooledSegmentHandle
-
identifier
Storage identifiers are ULIDs which are ordered lexicographically by the time of the expiration. This makes it possible to find the expired segments by listing the storage objects. This is crucial for the storage cleanup process to be able to efficiently delete the expired segments.- Specified by:
identifierin interfaceio.trino.spi.protocol.SpooledSegmentHandle- Returns:
- String lexicographically sortable storage object name
- See Also:
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
encoding
Returns the value of theencodingrecord component.- Specified by:
encodingin interfaceio.trino.spi.protocol.SpooledSegmentHandle- Returns:
- the value of the
encodingrecord component
-
uuid
public byte[] uuid()Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
encryptionKey
Returns the value of theencryptionKeyrecord component.- Returns:
- the value of the
encryptionKeyrecord component
-