Package com.tnsai.session
Record Class SearchableSessionStore.SessionStats
java.lang.Object
java.lang.Record
com.tnsai.session.SearchableSessionStore.SessionStats
- Enclosing interface:
SearchableSessionStore
public static record SearchableSessionStore.SessionStats(int totalSessions, int successfulSessions, int failedSessions, long totalTurns, double avgTurnsPerSession, List<String> topAgents, List<String> topTags)
extends Record
Session statistics.
-
Constructor Summary
ConstructorsConstructorDescriptionSessionStats(int totalSessions, int successfulSessions, int failedSessions, long totalTurns, double avgTurnsPerSession, List<String> topAgents, List<String> topTags) Creates an instance of aSessionStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theavgTurnsPerSessionrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefailedSessionsrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thesuccessfulSessionsrecord component.Returns the value of thetopAgentsrecord component.topTags()Returns the value of thetopTagsrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalSessionsrecord component.longReturns the value of thetotalTurnsrecord component.
-
Constructor Details
-
SessionStats
public SessionStats(int totalSessions, int successfulSessions, int failedSessions, long totalTurns, double avgTurnsPerSession, List<String> topAgents, List<String> topTags) Creates an instance of aSessionStatsrecord class.- Parameters:
totalSessions- the value for thetotalSessionsrecord componentsuccessfulSessions- the value for thesuccessfulSessionsrecord componentfailedSessions- the value for thefailedSessionsrecord componenttotalTurns- the value for thetotalTurnsrecord componentavgTurnsPerSession- the value for theavgTurnsPerSessionrecord componenttopAgents- the value for thetopAgentsrecord componenttopTags- the value for thetopTagsrecord 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 '=='. -
totalSessions
public int totalSessions()Returns the value of thetotalSessionsrecord component.- Returns:
- the value of the
totalSessionsrecord component
-
successfulSessions
public int successfulSessions()Returns the value of thesuccessfulSessionsrecord component.- Returns:
- the value of the
successfulSessionsrecord component
-
failedSessions
public int failedSessions()Returns the value of thefailedSessionsrecord component.- Returns:
- the value of the
failedSessionsrecord component
-
totalTurns
public long totalTurns()Returns the value of thetotalTurnsrecord component.- Returns:
- the value of the
totalTurnsrecord component
-
avgTurnsPerSession
public double avgTurnsPerSession()Returns the value of theavgTurnsPerSessionrecord component.- Returns:
- the value of the
avgTurnsPerSessionrecord component
-
topAgents
Returns the value of thetopAgentsrecord component.- Returns:
- the value of the
topAgentsrecord component
-
topTags
Returns the value of thetopTagsrecord component.- Returns:
- the value of the
topTagsrecord component
-