Package com.yapcli.agent
Record Class Agent.CompactionResult
java.lang.Object
java.lang.Record
com.yapcli.agent.Agent.CompactionResult
- Enclosing class:
- Agent
-
Constructor Summary
ConstructorsConstructorDescriptionCompactionResult(boolean compacted, long beforeTokens, long afterTokens, String error) Creates an instance of aCompactionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theafterTokensrecord component.longReturns the value of thebeforeTokensrecord component.booleanReturns the value of thecompactedrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CompactionResult
Creates an instance of aCompactionResultrecord class.- Parameters:
compacted- the value for thecompactedrecord componentbeforeTokens- the value for thebeforeTokensrecord componentafterTokens- the value for theafterTokensrecord componenterror- the value for theerrorrecord component
-
-
Method Details
-
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 '=='. -
compacted
public boolean compacted()Returns the value of thecompactedrecord component.- Returns:
- the value of the
compactedrecord component
-
beforeTokens
public long beforeTokens()Returns the value of thebeforeTokensrecord component.- Returns:
- the value of the
beforeTokensrecord component
-
afterTokens
public long afterTokens()Returns the value of theafterTokensrecord component.- Returns:
- the value of the
afterTokensrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-