Interface CleanupContext


  • public interface CleanupContext
    Initial data and logic needed for the cleanup of unused TAR entries.
    • 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:
        true if the entry should be reclaimed, false otherwise.
      • 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:
        true if the reference should be followed, false otherwise.