Record Class SizeLimitTracker.TrackerPair
java.lang.Object
java.lang.Record
io.micronaut.http.body.stream.SizeLimitTracker.TrackerPair
- Record Components:
totalSize- The tracker for total sizebufferedSize- The tracker for buffered size
- Enclosing interface:
SizeLimitTracker
public static record SizeLimitTracker.TrackerPair(SizeLimitTracker totalSize, SizeLimitTracker bufferedSize)
extends Record
A pair of trackers, one for the total size and one for the buffered size. This matches
BodySizeLimits.- Since:
- 5.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionTrackerPair(SizeLimitTracker totalSize, SizeLimitTracker bufferedSize) Creates an instance of aTrackerPairrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Exceptionadd(long value) Returns the value of thebufferedSizerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidsubtract(long value) final StringtoString()Returns a string representation of this record class.Returns the value of thetotalSizerecord component.
-
Constructor Details
-
TrackerPair
Creates an instance of aTrackerPairrecord class.- Parameters:
totalSize- the value for thetotalSizerecord componentbufferedSize- the value for thebufferedSizerecord component
-
-
Method Details
-
makeBothAtomic
-
add
-
subtract
public void subtract(long value) -
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). -
totalSize
-
bufferedSize
Returns the value of thebufferedSizerecord component.- Returns:
- the value of the
bufferedSizerecord component
-