Package org.projectnessie.gc.identify
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 CutoffPolicyDefines 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 Summary
Fields Modifier and Type Field Description static java.time.InstantNO_TIMESTAMPstatic CutoffPolicyNONE
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static CutoffPolicyatTimestamp(java.time.Instant cutoffTimestamp)booleanisCutoff(java.time.Instant commitTime, int numCommits)static CutoffPolicynumCommits(int commits)default java.time.Instanttimestamp()The timestamp of the "cutoff point" in a reference orNO_TIMESTAMPfor "no timestamp", nevernull.
-
-
-
Field Detail
-
NO_TIMESTAMP
static final java.time.Instant NO_TIMESTAMP
-
NONE
static final CutoffPolicy NONE
-
-
Method Detail
-
timestamp
default java.time.Instant timestamp()
The timestamp of the "cutoff point" in a reference orNO_TIMESTAMPfor "no timestamp", nevernull.
-
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)
-
-