Package akka.javasdk.agent.autonomous
Record Class Notification.TaskStruggleDetected
- All Implemented Interfaces:
Notification,Notification.StruggleNotification
- Enclosing interface:
Notification
public static record Notification.TaskStruggleDetected(String taskId, String taskName, String reason, int iteration, int maxIterations)
extends Record
implements Notification.StruggleNotification
Derived signal: a task is struggling — N consecutive iteration failures, M consecutive result
rejections, or some other impediment captured in
reason(). Fires once per detection;
the underlying counters reset on task termination or a successful recovery.-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.agent.autonomous.Notification
Notification.Activated, Notification.BacklogAccessGranted, Notification.BacklogAssigned, Notification.BacklogClosed, Notification.BacklogNotification, Notification.BacklogTaskClaimed, Notification.ContactAdded, Notification.ConversationCreated, Notification.ConversationEnded, Notification.ConversationJoined, Notification.ConversationNotification, Notification.ConversationParticipantReady, Notification.ConversationParticipantSetupFailed, Notification.ConversationTurnReceived, Notification.Deactivated, Notification.DelegationNotification, Notification.DelegationResolved, Notification.DelegationStarted, Notification.DependencyResolved, Notification.HandoffNotification, Notification.HandoffReceived, Notification.HandoffStarted, Notification.IterationCompleted, Notification.IterationFailed, Notification.IterationStarted, Notification.LifecycleNotification, Notification.MessageReceived, Notification.MessagingNotification, Notification.ParticipantTurnSubmitted, Notification.RepeatedIterationFailure, Notification.Resumed, Notification.Stopped, Notification.StruggleNotification, Notification.Suspended, Notification.TaskApproachingMaxIterations, Notification.TaskAssigned, Notification.TaskCancelled, Notification.TaskCompleted, Notification.TaskDependencyStuck, Notification.TaskDependencyWait, Notification.TaskFailed, Notification.TaskNotification, Notification.TaskResultRejected, Notification.TaskStarted, Notification.TaskStruggleDetected, Notification.TeamCreated, Notification.TeamDisbanded, Notification.TeamJoined, Notification.TeamMemberReady, Notification.TeamMemberSetupFailed, Notification.TeamMemberStopped, Notification.TeamNotification, Notification.WorkerTaskCompleted, Notification.WorkerTaskReceived -
Constructor Summary
ConstructorsConstructorDescriptionTaskStruggleDetected(String taskId, String taskName, String reason, int iteration, int maxIterations) Creates an instance of aTaskStruggleDetectedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theiterationrecord component.intReturns the value of themaxIterationsrecord component.reason()Returns the value of thereasonrecord component.taskId()Returns the value of thetaskIdrecord component.taskName()Returns the value of thetaskNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TaskStruggleDetected
public TaskStruggleDetected(String taskId, String taskName, String reason, int iteration, int maxIterations) Creates an instance of aTaskStruggleDetectedrecord class.- Parameters:
taskId- the value for thetaskIdrecord componenttaskName- the value for thetaskNamerecord componentreason- the value for thereasonrecord componentiteration- the value for theiterationrecord componentmaxIterations- the value for themaxIterationsrecord 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 '=='. -
taskId
Returns the value of thetaskIdrecord component.- Returns:
- the value of the
taskIdrecord component
-
taskName
Returns the value of thetaskNamerecord component.- Returns:
- the value of the
taskNamerecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
iteration
public int iteration()Returns the value of theiterationrecord component.- Returns:
- the value of the
iterationrecord component
-
maxIterations
public int maxIterations()Returns the value of themaxIterationsrecord component.- Returns:
- the value of the
maxIterationsrecord component
-