Record Class DistributedSet.SetStatistics
java.lang.Object
java.lang.Record
com.loomcache.server.datastructures.DistributedSet.SetStatistics
- Record Components:
totalAdds- total number of add operations (not operations, count of added elements)totalRemoves- total number of remove operationscurrentSize- current number of elements in the setpeakSize- maximum number of elements ever in the set
- Enclosing class:
DistributedSet<E>
public static record DistributedSet.SetStatistics(long totalAdds, long totalRemoves, int currentSize, long peakSize)
extends Record
SetStatistics record for capturing aggregate metrics.
- Since:
- 1.1
-
Constructor Summary
ConstructorsConstructorDescriptionSetStatistics(long totalAdds, long totalRemoves, int currentSize, long peakSize) Creates an instance of aSetStatisticsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecurrentSizerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longpeakSize()Returns the value of thepeakSizerecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalAddsrecord component.longReturns the value of thetotalRemovesrecord component.
-
Constructor Details
-
SetStatistics
public SetStatistics(long totalAdds, long totalRemoves, int currentSize, long peakSize) Creates an instance of aSetStatisticsrecord class.- Parameters:
totalAdds- the value for thetotalAddsrecord componenttotalRemoves- the value for thetotalRemovesrecord componentcurrentSize- the value for thecurrentSizerecord componentpeakSize- the value for thepeakSizerecord component
-
-
Method Details
-
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 with thecomparemethod from their corresponding wrapper classes. -
totalAdds
-
totalRemoves
public long totalRemoves()Returns the value of thetotalRemovesrecord component.- Returns:
- the value of the
totalRemovesrecord component
-
currentSize
public int currentSize()Returns the value of thecurrentSizerecord component.- Returns:
- the value of the
currentSizerecord component
-
peakSize
-