Package org.axonframework.test.deadline
Class ScheduledDeadlineInfo
java.lang.Object
org.axonframework.test.deadline.ScheduledDeadlineInfo
- All Implemented Interfaces:
Comparable<ScheduledDeadlineInfo>
Holds the data regarding deadline schedule.
- Since:
- 3.3
- Author:
- Milan Savic, Steven van Beelen
-
Constructor Summary
ConstructorsConstructorDescriptionScheduledDeadlineInfo(Instant scheduleTime, String deadlineName, String scheduleId, int counter, DeadlineMessage<?> deadlineMessage, ScopeDescriptor deadlineScope) Instantiates a ScheduledDeadlineInfo. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ScheduledDeadlineInfo other) booleanintRetrieve the counter used to differentiate two deadlines scheduled at the same time.Retrieve aStringdenoting the name of the deadline; can be used together with thescheduleIdto cancel the deadline.Retrieve a description of theScopein which the deadline is scheduled.Retrieve aStringidentifier representing the scheduled deadline; can be used together with thedeadlineNameto cancel the deadline.Retrieve the time as anInstantat which the deadline is scheduled.inthashCode()recreateWithNewMessage(DeadlineMessage<?> deadlineMessage) Creates a new instance of scheduled deadline info with newdeadlineMessage.
-
Constructor Details
-
ScheduledDeadlineInfo
public ScheduledDeadlineInfo(Instant scheduleTime, String deadlineName, String scheduleId, int counter, DeadlineMessage<?> deadlineMessage, ScopeDescriptor deadlineScope) Instantiates a ScheduledDeadlineInfo.- Parameters:
scheduleTime- The time as anInstantat which the deadline is scheduleddeadlineName- AStringdenoting the name of the deadline; can be used together with thescheduleIdto cancel the deadlinescheduleId- AStringidentifier representing the scheduled deadline; can be used together with thedeadlineNameto cancel the deadlinecounter- Used to differentiate two deadlines scheduled at the same timedeadlineMessage- The deadline message of the scheduled deadline.deadlineScope- A description of theScopein which the deadline is scheduled
-
-
Method Details
-
recreateWithNewMessage
Creates a new instance of scheduled deadline info with newdeadlineMessage. Other fields are the same.- Parameters:
deadlineMessage- New deadline message- Returns:
- new instance with given
deadlineMessage
-
getScheduleTime
Retrieve the time as anInstantat which the deadline is scheduled.- Returns:
- the time as an
Instantat which the deadline is scheduled
-
getDeadlineName
Retrieve aStringdenoting the name of the deadline; can be used together with thescheduleIdto cancel the deadline.- Returns:
- a
Stringdenoting the name of the deadline; can be used together with thescheduleIdto cancel the deadline
-
getScheduleId
Retrieve aStringidentifier representing the scheduled deadline; can be used together with thedeadlineNameto cancel the deadline.- Returns:
- a
Stringidentifier representing the scheduled deadline; can be used together with thedeadlineNameto cancel the deadline
-
getCounter
public int getCounter()Retrieve the counter used to differentiate two deadlines scheduled at the same time.- Returns:
- the counter used to differentiate two deadlines scheduled at the same time
-
getDeadlineScope
Retrieve a description of theScopein which the deadline is scheduled.- Returns:
- a description of the
Scopein which the deadline is scheduled
-
deadlineMessage
- Returns:
- a
DeadlineMessageconstructed out of thedeadlineNameanddeadlineInfo
-
compareTo
- Specified by:
compareToin interfaceComparable<ScheduledDeadlineInfo>
-
equals
-
hashCode
public int hashCode()
-