Interface ConstructSnapshot.SnapshotFunction

Enclosing class:
ConstructSnapshot
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ConstructSnapshot.SnapshotFunction
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    call(boolean usePrev, long beforeClockValue)
    A function that would like to take a snapshot of data guarded by a retry loop with data consistency tests.
  • Method Details

    • call

      boolean call(boolean usePrev, long beforeClockValue)
      A function that would like to take a snapshot of data guarded by a retry loop with data consistency tests.
      Parameters:
      usePrev - Whether data from the previous cycle should be used (otherwise use this cycle)
      beforeClockValue - The clock value that we captured before the function began; the function can use this value to bail out early if it notices something has gone wrong; -1L for static snapshots
      Returns:
      true if the function was successful, false if it should be retried