Class Moments.Task
java.lang.Object
org.springframework.modulith.moments.support.Moments.Task
- Enclosing class:
- Moments
A method invocation to be scheduled per
MomentsProperties.Granularity.- Since:
- 2.2
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionReturn the cron expression to schedule the task at.getTask()Returns the actual task to be executed.(package private) booleanhasGranularity(MomentsProperties.Granularity granularity) Returns whether the currentMoments.Taskis associated with the givenMomentsProperties.Granularity.(package private) static Collection<Moments.Task>of(MomentsProperties.Granularity granularity, Moments moments) Returns all tasks to be scheduled for the givenMomentsProperties.GranularityandMomentsinstance.
-
Method Details
-
of
Returns all tasks to be scheduled for the givenMomentsProperties.GranularityandMomentsinstance.- Parameters:
granularity- must not be null.moments- must not be null.- Returns:
- will never be null.
-
getTask
Returns the actual task to be executed.- Returns:
- will never be null.
-
getExpression
Return the cron expression to schedule the task at.- Returns:
- will never be null.
-
hasGranularity
Returns whether the currentMoments.Taskis associated with the givenMomentsProperties.Granularity.- Parameters:
granularity- must not be null.
-