Package dev.shamoo.runtime.core
Record Class ResourceCleanupReport
java.lang.Object
java.lang.Record
dev.shamoo.runtime.core.ResourceCleanupReport
public record ResourceCleanupReport(PluginId owner, int attempted, int cleaned, List<ResourceRegistration> leaked, List<Exception> errors)
extends Record
Result of a reverse-order resource cleanup pass.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceCleanupReport(PluginId owner, int attempted, int cleaned, List<ResourceRegistration> leaked, List<Exception> errors) Creates an instance of aResourceCleanupReportrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theattemptedrecord component.booleanclean()intcleaned()Returns the value of thecleanedrecord component.final booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.final inthashCode()Returns a hash code value for this object.leaked()Returns the value of theleakedrecord component.owner()Returns the value of theownerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResourceCleanupReport
public ResourceCleanupReport(PluginId owner, int attempted, int cleaned, List<ResourceRegistration> leaked, List<Exception> errors) Creates an instance of aResourceCleanupReportrecord class.- Parameters:
owner- the value for theownerrecord componentattempted- the value for theattemptedrecord componentcleaned- the value for thecleanedrecord componentleaked- the value for theleakedrecord componenterrors- the value for theerrorsrecord component
-
-
Method Details
-
clean
public boolean clean() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
attempted
public int attempted()Returns the value of theattemptedrecord component.- Returns:
- the value of the
attemptedrecord component
-
cleaned
public int cleaned()Returns the value of thecleanedrecord component.- Returns:
- the value of the
cleanedrecord component
-
leaked
Returns the value of theleakedrecord component.- Returns:
- the value of the
leakedrecord component
-
errors
Returns the value of theerrorsrecord component.- Returns:
- the value of the
errorsrecord component
-