Package io.agentscope.harness.agent.team
Record Class TeamContext.RecoveryContext
java.lang.Object
java.lang.Record
io.agentscope.harness.agent.team.TeamContext.RecoveryContext
- Enclosing class:
- TeamContext
public static record TeamContext.RecoveryContext(String previousSessionId, int restartCount, List<TeamContext.CompletedTask> completedTasks, TeamContext.InterruptedTask interruptedTask, List<TeamContext.RecentMessage> recentMessages)
extends Record
Injected when a member session is recovering after a crash/reschedule.
-
Constructor Summary
ConstructorsConstructorDescriptionRecoveryContext(String previousSessionId, int restartCount, List<TeamContext.CompletedTask> completedTasks, TeamContext.InterruptedTask interruptedTask, List<TeamContext.RecentMessage> recentMessages) Creates an instance of aRecoveryContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompletedTasksrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinterruptedTaskrecord component.Returns the value of thepreviousSessionIdrecord component.Returns the value of therecentMessagesrecord component.intReturns the value of therestartCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RecoveryContext
public RecoveryContext(String previousSessionId, int restartCount, List<TeamContext.CompletedTask> completedTasks, TeamContext.InterruptedTask interruptedTask, List<TeamContext.RecentMessage> recentMessages) Creates an instance of aRecoveryContextrecord class.- Parameters:
previousSessionId- the value for thepreviousSessionIdrecord componentrestartCount- the value for therestartCountrecord componentcompletedTasks- the value for thecompletedTasksrecord componentinterruptedTask- the value for theinterruptedTaskrecord componentrecentMessages- the value for therecentMessagesrecord 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 '=='. -
previousSessionId
Returns the value of thepreviousSessionIdrecord component.- Returns:
- the value of the
previousSessionIdrecord component
-
restartCount
public int restartCount()Returns the value of therestartCountrecord component.- Returns:
- the value of the
restartCountrecord component
-
completedTasks
Returns the value of thecompletedTasksrecord component.- Returns:
- the value of the
completedTasksrecord component
-
interruptedTask
Returns the value of theinterruptedTaskrecord component.- Returns:
- the value of the
interruptedTaskrecord component
-
recentMessages
Returns the value of therecentMessagesrecord component.- Returns:
- the value of the
recentMessagesrecord component
-