Interface CleanupContext


  • public interface CleanupContext
    Initial data and logic needed for the cleanup of unused TAR entries.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Collection<java.util.UUID> initialReferences()
      Initial references to TAR entries.
      boolean shouldFollow​(java.util.UUID from, java.util.UUID to)
      Determine if a reference between two entries should be followed, and if the referenced entry should be marked.
      boolean shouldReclaim​(java.util.UUID id, GCGeneration generation, boolean referenced)
      Check if an entry should be reclaimed.
    • Method Detail

      • initialReferences

        java.util.Collection<java.util.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​(java.util.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​(java.util.UUID from,
                             java.util.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.