Record Class ResourceUsageSnapshot
java.lang.Object
java.lang.Record
org.j7m.middleware.api.isolation.ResourceUsageSnapshot
- Record Components:
runtime- elapsed runtimestdoutBytes- captured stdout bytesstderrBytes- captured stderr bytesenvironmentBytes- sanitized environment bytes
-
Constructor Summary
ConstructorsConstructorDescriptionResourceUsageSnapshot(Duration runtime, int stdoutBytes, int stderrBytes, int environmentBytes) Creates a validated usage snapshot. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theenvironmentBytesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.runtime()Returns the value of theruntimerecord component.intReturns the value of thestderrBytesrecord component.intReturns the value of thestdoutBytesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResourceUsageSnapshot
public ResourceUsageSnapshot(Duration runtime, int stdoutBytes, int stderrBytes, int environmentBytes) Creates a validated usage snapshot.
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
runtime
-
stdoutBytes
public int stdoutBytes()Returns the value of thestdoutBytesrecord component.- Returns:
- the value of the
stdoutBytesrecord component
-
stderrBytes
public int stderrBytes()Returns the value of thestderrBytesrecord component.- Returns:
- the value of the
stderrBytesrecord component
-
environmentBytes
public int environmentBytes()Returns the value of theenvironmentBytesrecord component.- Returns:
- the value of the
environmentBytesrecord component
-