Package org.projectnessie.gc.identify
Class IdentifyLiveContents
- java.lang.Object
-
- org.projectnessie.gc.identify.IdentifyLiveContents
-
@Immutable public abstract class IdentifyLiveContents extends java.lang.ObjectIdentifies all liveContentobjects in Nessie, the mark phase of the mark-and-sweep approach.Nessie's garbage collection is a mark-and-sweep collector. Instances of this class should only be
usedonce.This class implements the mark phase that identifies all live content objects.
Behavior of this class is controlled via a couple of parameters, which provide:
- A function to retrieve the
cut-off timestamp for a reference. - A predicate to test whether a
content type is handledby the GC run. - A consumer via
liveContentSetsRepository()for the identified live content objects}. - The desired number of named-references being walked concurrently.
- A
de-duplication functionalityto prevent walking the same commit(s) with compatible cut-off timestamps.
- A function to retrieve the
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceIdentifyLiveContents.Builder
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PARALLELISM
-
Constructor Summary
Constructors Constructor Description IdentifyLiveContents()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdentifyLiveContents.Builderbuilder()java.util.UUIDidentifyLiveContents()Identifies the live content objects.
-
-
-
Field Detail
-
DEFAULT_PARALLELISM
public static final int DEFAULT_PARALLELISM
- See Also:
- Constant Field Values
-
-
Method Detail
-
builder
public static IdentifyLiveContents.Builder builder()
-
identifyLiveContents
public java.util.UUID identifyLiveContents()
Identifies the live content objects.- Returns:
- the ID of the live-contents-set, from
AddContents.id(), which is used to later retrieve theLiveContentSetused byExpireimplementations viaExpireParameters.liveContentSet().
-
-