Interface GridCache

  • All Known Implementing Classes:
    FileGridCache, LazyGridCache

    public interface GridCache
    An interface for accessing some intermediate grids in a project, which are stored on disk.
    • Method Detail

      • listCachedGridIds

        Set<Long> listCachedGridIds()
        Lists the set of history entry ids for which the resulting grid is cached.
      • getCachedGrid

        Grid getCachedGrid​(long id)
                    throws IOException
        Retrieves a disk-cached grid.
        Parameters:
        id - the id of the history entry which produced it
        Returns:
        the cached grid
        Throws:
        IOException - if the grid could not be loaded from disk
      • uncacheGrid

        void uncacheGrid​(long id)
                  throws IOException
        Discards the on-disk cache of a grid
        Parameters:
        id - the id of the history entry which produced it.
        Throws:
        IOException - if removing the grid from the cache did not succeed
      • cacheGrid

        Grid cacheGrid​(long id,
                       Grid grid)
                throws IOException
        Caches a grid on disk.
        Parameters:
        id - the id of the history entry which produced it
        grid - the grid to cache
        Returns:
        the same grid read from disk instead.
        Throws:
        IOException - if caching the grid failed