Record Class TcpServer.BandwidthStats
java.lang.Object
java.lang.Record
com.loomcache.server.network.TcpServer.BandwidthStats
- Enclosing class:
TcpServer
public static record TcpServer.BandwidthStats(long totalBytesIn, long totalBytesOut, double bytesInPerSecond, double bytesOutPerSecond)
extends Record
Bandwidth statistics for the server.
Includes total bytes in/out and per-second rates.
-
Constructor Summary
ConstructorsConstructorDescriptionBandwidthStats(long totalBytesIn, long totalBytesOut, double bytesInPerSecond, double bytesOutPerSecond) Creates an instance of aBandwidthStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thebytesInPerSecondrecord component.doubleReturns the value of thebytesOutPerSecondrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalBytesInrecord component.longReturns the value of thetotalBytesOutrecord component.
-
Constructor Details
-
BandwidthStats
public BandwidthStats(long totalBytesIn, long totalBytesOut, double bytesInPerSecond, double bytesOutPerSecond) Creates an instance of aBandwidthStatsrecord class.- Parameters:
totalBytesIn- the value for thetotalBytesInrecord componenttotalBytesOut- the value for thetotalBytesOutrecord componentbytesInPerSecond- the value for thebytesInPerSecondrecord componentbytesOutPerSecond- the value for thebytesOutPerSecondrecord 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. -
totalBytesIn
public long totalBytesIn()Returns the value of thetotalBytesInrecord component.- Returns:
- the value of the
totalBytesInrecord component
-
totalBytesOut
public long totalBytesOut()Returns the value of thetotalBytesOutrecord component.- Returns:
- the value of the
totalBytesOutrecord component
-
bytesInPerSecond
public double bytesInPerSecond()Returns the value of thebytesInPerSecondrecord component.- Returns:
- the value of the
bytesInPerSecondrecord component
-
bytesOutPerSecond
public double bytesOutPerSecond()Returns the value of thebytesOutPerSecondrecord component.- Returns:
- the value of the
bytesOutPerSecondrecord component
-