Interface CutoffPolicy

  • 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 interface CutoffPolicy
    Defines the cutoff point for a reference, which can be a fixed timestamp, a number of commits to retain, a combination of both or none to retain everything.
    • Field Detail

      • NO_TIMESTAMP

        static final java.time.Instant NO_TIMESTAMP
    • Method Detail

      • timestamp

        default java.time.Instant timestamp()
        The timestamp of the "cutoff point" in a reference or NO_TIMESTAMP for "no timestamp", never null.
      • isCutoff

        boolean isCutoff​(@Nonnull @Nonnull
                         java.time.Instant commitTime,
                         int numCommits)
      • atTimestamp

        static CutoffPolicy atTimestamp​(@Nonnull @Nonnull
                                        java.time.Instant cutoffTimestamp)
      • numCommits

        static CutoffPolicy numCommits​(int commits)