Class MutableSagaClock

java.lang.Object
java.time.Clock
org.j7m.middleware.saga.MutableSagaClock
All Implemented Interfaces:
InstantSource

public final class MutableSagaClock extends Clock
Mutable deterministic clock for saga tests and demos.
  • Constructor Details

    • MutableSagaClock

      public MutableSagaClock(Instant instant)
      Creates a UTC clock at an instant.
      Parameters:
      instant - initial instant, or epoch when null
    • MutableSagaClock

      public MutableSagaClock(Instant instant, ZoneId zone)
      Creates a clock at an instant and zone.
      Parameters:
      instant - initial instant, or epoch when null
      zone - time zone, or UTC when null
  • Method Details