Package org.projectnessie.gc.identify
Interface IdentifyLiveContents.Builder
-
- Enclosing class:
- IdentifyLiveContents
public static interface IdentifyLiveContents.Builder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IdentifyLiveContentsbuild()IdentifyLiveContents.BuildercontentToContentReference(ContentToContentReference contentToContentReference)IdentifyLiveContents.BuildercontentTypeFilter(ContentTypeFilter contentTypeFilter)Checks whether the given content-type is handled by the GC implementation.IdentifyLiveContents.BuildercutOffPolicySupplier(PerRefCutoffPolicySupplier cutOffTimestamp)Provides a function that provides theCutoffPolicyfor a given reference.IdentifyLiveContents.BuilderliveContentSetsRepository(LiveContentSetsRepository liveContentSetsRepository)The consumer that is called when a liveContentobject has been found.IdentifyLiveContents.Builderparallelism(int parallelism)Configures the number of references that can expire concurrently, default is 4.IdentifyLiveContents.BuilderreferenceComparator(ReferenceComparator referenceComparator)Optional ability to sort all Nessie named references to make the configuredIdentifyLiveContents.visitedDeduplicator()work more efficiently.IdentifyLiveContents.BuilderrepositoryConnector(RepositoryConnector repositoryConnector)Encapsulates all calls against Nessie, abstracted for testing purposes.IdentifyLiveContents.BuildervisitedDeduplicator(VisitedDeduplicator visitedDeduplicator)The predicate called to prevent traversing the same commit-ID with a compatible cut-off-timestamp.
-
-
-
Method Detail
-
cutOffPolicySupplier
@CanIgnoreReturnValue IdentifyLiveContents.Builder cutOffPolicySupplier(PerRefCutoffPolicySupplier cutOffTimestamp)
Provides a function that provides theCutoffPolicyfor a given reference.If the implementation uses relative times (aka durations), it is highly recommended that the result of equal relative times (durations) returns deterministic results. This means, that for two (different) references configured with the same cut-off-duration, the function shall return the same
Instant. In other words, all calculations should be performed against a "constant" value of "now". This will improve the efficiency of implementations forIdentifyLiveContents.visitedDeduplicator()likeVisitedDeduplicator.The implementing
Functionmust never returnnull.- See Also:
referenceComparator(ReferenceComparator)
-
contentTypeFilter
@CanIgnoreReturnValue IdentifyLiveContents.Builder contentTypeFilter(ContentTypeFilter contentTypeFilter)
Checks whether the given content-type is handled by the GC implementation.
-
liveContentSetsRepository
@CanIgnoreReturnValue IdentifyLiveContents.Builder liveContentSetsRepository(LiveContentSetsRepository liveContentSetsRepository)
The consumer that is called when a liveContentobject has been found. Parameters are the commit-ID at which the content object has been found and the content object itself.Implementations must be aware that multiple calls for the same
Contentobject will occur, so deduplication is recommended.
-
contentToContentReference
@CanIgnoreReturnValue IdentifyLiveContents.Builder contentToContentReference(ContentToContentReference contentToContentReference)
-
repositoryConnector
@CanIgnoreReturnValue IdentifyLiveContents.Builder repositoryConnector(RepositoryConnector repositoryConnector)
Encapsulates all calls against Nessie, abstracted for testing purposes.
-
visitedDeduplicator
@CanIgnoreReturnValue IdentifyLiveContents.Builder visitedDeduplicator(VisitedDeduplicator visitedDeduplicator)
The predicate called to prevent traversing the same commit-ID with a compatible cut-off-timestamp. The default implementation does not prevent unnecessary commit-log scanning.- See Also:
referenceComparator(ReferenceComparator)
-
referenceComparator
@CanIgnoreReturnValue IdentifyLiveContents.Builder referenceComparator(ReferenceComparator referenceComparator)
Optional ability to sort all Nessie named references to make the configuredIdentifyLiveContents.visitedDeduplicator()work more efficiently. For example theDefaultVisitedDeduplicatorbenefits from processing references in the reverse order of a reference's highest retention time.
-
parallelism
@CanIgnoreReturnValue IdentifyLiveContents.Builder parallelism(int parallelism)
Configures the number of references that can expire concurrently, default is 4.
-
build
IdentifyLiveContents build()
-
-