public class SimpleDeadlineManager extends AbstractDeadlineManager
DeadlineManagerwhich uses Java's
ScheduledExecutorServiceas scheduling and triggering mechanism.
Note that this mechanism is non-persistent. Scheduled tasks will be lost then the JVM is shut down, unless special
measures have been taken to prevent that. For more flexible and powerful scheduling options, see
|Modifier and Type||Class and Description|
Builder class to instantiate a
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
Instantiate a Builder to be able to create a
Cancels all the deadlines corresponding to the given
Cancels all deadlines corresponding to the given
Cancels the deadline corresponding to the given
Schedules a deadline at given
Shuts down this deadline manager.
dispatchInterceptors, handlerInterceptors, processDispatchInterceptors, registerDispatchInterceptor, registerHandlerInterceptor, runOnPrepareCommitOrNow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected SimpleDeadlineManager(SimpleDeadlineManager.Builder builder)
SimpleDeadlineManagerbased on the fields contained in the
SimpleDeadlineManager.Builderto handle the process around scheduling and triggering a
public static SimpleDeadlineManager.Builder builder()
ScheduledExecutorService is defaulted to an
which contains an
AxonThreadFactory, and the
TransactionManager defaults to a
ScopeAwareProvider is a hard requirement and as such should be
public String schedule(Instant triggerDateTime, String deadlineName, Object messageOrPayload, ScopeDescriptor deadlineScope)
triggerDateTimewith provided context. The returned
deadlineNamecombination can be used to cancel the scheduled deadline.
messageOrPayload may be any object, as well as a DeadlineMessage. In the latter case, the
instance provided is the donor for the payload and
MetaData of the actual
deadline being used. In the former case, the given
messageOrPayload will be wrapped as the payload of a
Instantdenoting the moment to trigger the deadline handling
Stringrepresenting the name of the deadline to schedule
Messageor payload for a message as an
ScopeDescriptordescribing the scope within which the deadline was scheduled
Stringto use when cancelling the schedule
scheduleIdcombination. This method has no impact on deadlines which have already been triggered.
public void cancelAll(String deadlineName)
deadlineName. This method has no impact on deadlines which have already been triggered.
Stringrepresenting the name of the deadlines to cancel
public void cancelAllWithinScope(String deadlineName, ScopeDescriptor scope)
scope. This method has no impact on deadlines which have already been triggered.
Copyright © 2010–2020. All rights reserved.