Record Class MemorySegmentFreeDrop
java.lang.Object
java.lang.Record
eu.cloudnetservice.driver.impl.network.netty.memory.MemorySegmentFreeDrop
- Record Components:
segment- the segment to free when dropping.byteSize- the size of the given memory segment.
- All Implemented Interfaces:
io.netty5.buffer.Drop<io.netty5.buffer.Buffer>
record MemorySegmentFreeDrop(@NonNull MemorySegment segment, long byteSize)
extends Record
implements io.netty5.buffer.Drop<io.netty5.buffer.Buffer>
Drop that frees the given memory segment when dropped.
- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMemorySegmentFreeDrop(@NonNull MemorySegment segment) Constructs a new instance using the byte size of the given memory segment.MemorySegmentFreeDrop(@NonNull MemorySegment segment, long byteSize) Creates an instance of aMemorySegmentFreeDroprecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidlongbyteSize()Returns the value of thebyteSizerecord component.voidfinal booleanIndicates whether some other object is "equal to" this one.@NonNull io.netty5.buffer.Drop<io.netty5.buffer.Buffer> fork()final inthashCode()Returns a hash code value for this object.segment()Returns the value of thesegmentrecord component.toString()
-
Field Details
-
Constructor Details
-
MemorySegmentFreeDrop
Creates an instance of aMemorySegmentFreeDroprecord class. -
MemorySegmentFreeDrop
Constructs a new instance using the byte size of the given memory segment.- Parameters:
segment- the segment to free when dropping.- Throws:
NullPointerException- if the given segment is null.
-
-
Method Details
-
drop
-
fork
-
attach
-
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. -
segment
-
byteSize
-