Interface CleanupContext
public interface CleanupContext
Initial data and logic needed for the cleanup of unused TAR entries.
-
Method Summary
Modifier and TypeMethodDescriptionInitial references to TAR entries.booleanshouldFollow(UUID from, UUID to) Determine if a reference between two entries should be followed, and if the referenced entry should be marked.booleanshouldReclaim(UUID id, GCGeneration generation, boolean referenced) Check if an entry should be reclaimed.
-
Method Details
-
initialReferences
Collection<UUID> initialReferences()Initial references to TAR entries. These references represent the entries that are currently in use. The transitive closure of these entries will be computed by the cleanup algorithm.- Returns:
- An instance of
Collection.
-
shouldReclaim
Check if an entry should be reclaimed.- Parameters:
id- The identifier of the entry.generation- The generation of the entry.referenced- If this entry was referenced directly or indirectly by the initial set of references.- Returns:
trueif the entry should be reclaimed,falseotherwise.
-
shouldFollow
Determine if a reference between two entries should be followed, and if the referenced entry should be marked.- Parameters:
from- The identifier of the referencing entry.to- The identifier of the referenced entry.- Returns:
trueif the reference should be followed,falseotherwise.
-