Class Moments
java.lang.Object
org.springframework.modulith.moments.support.Moments
- Direct Known Subclasses:
TimeMachine
Core component to publish passage-of-time events.
- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorsConstructorDescriptionMoments(Clock clock, ApplicationEventPublisher events, MomentsProperties properties) -
Method Summary
Modifier and TypeMethodDescription(package private) voidTriggers event publication every hour.(package private) voidTriggers event publication every midnight.(package private) LocalDateTimenow()(package private) Moments
-
Constructor Details
-
Moments
- Parameters:
clock- must not be null.events- must not be null.properties- must not be null.
-
-
Method Details
-
everyHour
Triggers event publication every hour. -
everyMidnight
Triggers event publication every midnight. -
shiftBy
-
now
LocalDateTime now()
-