Record Class DecisionTraceStore.DecisionTraceStatistics

java.lang.Object
java.lang.Record
com.tnsai.context.decision.DecisionTraceStore.DecisionTraceStatistics
Enclosing interface:
DecisionTraceStore

public static record DecisionTraceStore.DecisionTraceStatistics(int totalTraces, int uniqueAgents, int successfulDecisions, int failedDecisions, Instant oldestTrace, Instant newestTrace, Map<String,Integer> tracesByAction, Map<DecisionOutcome.OutcomeStatus,Integer> tracesByOutcome) extends Record
Statistics about the decision trace store.
  • Constructor Details

    • DecisionTraceStatistics

      public DecisionTraceStatistics(int totalTraces, int uniqueAgents, int successfulDecisions, int failedDecisions, Instant oldestTrace, Instant newestTrace, Map<String,Integer> tracesByAction, Map<DecisionOutcome.OutcomeStatus,Integer> tracesByOutcome)
      Creates an instance of a DecisionTraceStatistics record class.
      Parameters:
      totalTraces - the value for the totalTraces record component
      uniqueAgents - the value for the uniqueAgents record component
      successfulDecisions - the value for the successfulDecisions record component
      failedDecisions - the value for the failedDecisions record component
      oldestTrace - the value for the oldestTrace record component
      newestTrace - the value for the newestTrace record component
      tracesByAction - the value for the tracesByAction record component
      tracesByOutcome - the value for the tracesByOutcome record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • totalTraces

      public int totalTraces()
      Returns the value of the totalTraces record component.
      Returns:
      the value of the totalTraces record component
    • uniqueAgents

      public int uniqueAgents()
      Returns the value of the uniqueAgents record component.
      Returns:
      the value of the uniqueAgents record component
    • successfulDecisions

      public int successfulDecisions()
      Returns the value of the successfulDecisions record component.
      Returns:
      the value of the successfulDecisions record component
    • failedDecisions

      public int failedDecisions()
      Returns the value of the failedDecisions record component.
      Returns:
      the value of the failedDecisions record component
    • oldestTrace

      public Instant oldestTrace()
      Returns the value of the oldestTrace record component.
      Returns:
      the value of the oldestTrace record component
    • newestTrace

      public Instant newestTrace()
      Returns the value of the newestTrace record component.
      Returns:
      the value of the newestTrace record component
    • tracesByAction

      public Map<String,Integer> tracesByAction()
      Returns the value of the tracesByAction record component.
      Returns:
      the value of the tracesByAction record component
    • tracesByOutcome

      public Map<DecisionOutcome.OutcomeStatus,Integer> tracesByOutcome()
      Returns the value of the tracesByOutcome record component.
      Returns:
      the value of the tracesByOutcome record component