Interface CleanupContext
-
public interface CleanupContextInitial data and logic needed for the cleanup of unused TAR entries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<UUID>initialReferences()Initial 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 Detail
-
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
boolean shouldReclaim(UUID id, GCGeneration generation, boolean referenced)
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
boolean shouldFollow(UUID from, UUID to)
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.
-
-