Record Class RetryExceptionHandler.FailedEvent
java.lang.Object
java.lang.Record
cloud.opencode.base.event.handler.RetryExceptionHandler.FailedEvent
- Record Components:
event- the failed event | 失败的事件exception- the exception that caused failure | 导致失败的异常listenerName- the listener that failed | 失败的监听器attempts- number of retry attempts | 重试次数
- Enclosing class:
RetryExceptionHandler
public static record RetryExceptionHandler.FailedEvent(Event event, Throwable exception, String listenerName, int attempts)
extends Record
Failed Event Record
失败事件记录
- Since:
- JDK 25, opencode-base-event V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionFailedEvent(Event event, Throwable exception, String listenerName, int attempts) Creates an instance of aFailedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintattempts()Returns the value of theattemptsrecord component.final booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.Returns the value of theexceptionrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelistenerNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FailedEvent
Creates an instance of aFailedEventrecord class.- Parameters:
event- the value for theeventrecord componentexception- the value for theexceptionrecord componentlistenerName- the value for thelistenerNamerecord componentattempts- the value for theattemptsrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
event
-
exception
-
listenerName
Returns the value of thelistenerNamerecord component.- Returns:
- the value of the
listenerNamerecord component
-
attempts
-