Interface SnapshotCapable

All Known Subinterfaces:
AggregatedPoint<V,A>, AtomicPoint<V>, DataPoint<V>
All Known Implementing Classes:
AggregatedDataPoint

public sealed interface SnapshotCapable permits DataPoint<V>
An entity that can be copied as a snapshot at a given time; implemented by DataPoint.
  • Method Details

    • snapshotTimestamp

      Optional<Instant> snapshotTimestamp()
      Returns the snapshot timestamp, or empty if this is not a snapshot.
    • isSnapshot

      default boolean isSnapshot()
      Whether a snapshot timestamp is present.
    • withSnapshot

      default SnapshotCapable withSnapshot()
      Returns a copy that is a snapshot at the current time.
    • withSnapshot

      SnapshotCapable withSnapshot(Instant timestamp)
      Returns a copy that is a snapshot at the given time.
      Parameters:
      timestamp - the snapshot time