Class FileGridCache

    • Constructor Detail

      • FileGridCache

        public FileGridCache​(Runner runner,
                             File baseDir)
    • Method Detail

      • getGridPath

        protected File getGridPath​(long id)
      • listCachedGridIds

        public Set<Long> listCachedGridIds()
        Description copied from interface: GridCache
        Lists the set of history entry ids for which the resulting grid is cached.
        Specified by:
        listCachedGridIds in interface GridCache
      • getCachedGrid

        public Grid getCachedGrid​(long id)
                           throws IOException
        Description copied from interface: GridCache
        Retrieves a disk-cached grid.
        Specified by:
        getCachedGrid in interface GridCache
        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

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

        public Grid cacheGrid​(long id,
                              Grid grid)
                       throws IOException
        Description copied from interface: GridCache
        Caches a grid on disk.
        Specified by:
        cacheGrid in interface GridCache
        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