Package org.openrefine.model.changes
Interface GridCache
-
- All Known Implementing Classes:
FileGridCache,LazyGridCache
public interface GridCacheAn interface for accessing some intermediate grids in a project, which are stored on disk.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GridcacheGrid(long id, Grid grid)Caches a grid on disk.GridgetCachedGrid(long id)Retrieves a disk-cached grid.Set<Long>listCachedGridIds()Lists the set of history entry ids for which the resulting grid is cached.voiduncacheGrid(long id)Discards the on-disk cache of a grid
-
-
-
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 IOExceptionDiscards 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 itgrid- the grid to cache- Returns:
- the same grid read from disk instead.
- Throws:
IOException- if caching the grid failed
-
-