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
ConstructorDescriptionMoments
(Clock clock, ApplicationEventPublisher events, MomentsProperties properties) -
Method Summary
Modifier and TypeMethodDescription(package private) void
Triggers event publication every hour.(package private) void
Triggers event publication every midnight.(package private) LocalDateTime
now()
(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()
-