public class VolatileGlobalCellCache extends Object implements CacheControl
| Modifier and Type | Class and Description |
|---|---|
static class |
VolatileGlobalCellCache.Key
Key for a cell identified by timepoint, setup, level, and index
(flattened spatial coordinate).
|
CacheControl.CacheControls, CacheControl.Dummy| Modifier and Type | Field and Description |
|---|---|
protected LoaderCache<VolatileGlobalCellCache.Key,Cell<?>> |
backingCache |
| Constructor and Description |
|---|
VolatileGlobalCellCache(BlockingFetchQueues<Callable<?>> queue)
Create a new global cache with the specified fetch queue.
|
VolatileGlobalCellCache(int maxNumLevels,
int numFetcherThreads)
Create a new global cache with a new fetch queue served by the specified
number of fetcher threads.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
Remove all references to loaded data as well as all enqueued requests
from the cache.
|
<T extends NativeType<T>,A> |
createImg(CellGrid grid,
int timepoint,
int setup,
int level,
CacheHints cacheHints,
CacheArrayLoader<A> cacheArrayLoader,
T type)
Create a
VolatileCachedCellImg backed by this VolatileGlobalCellCache,
using the provided CacheArrayLoader to load data. |
<T extends NativeType<T>,A> |
createImg(CellGrid grid,
int timepoint,
int setup,
int level,
CacheHints cacheHints,
SimpleCacheArrayLoader<A> cacheArrayLoader,
T type)
Create a
VolatileCachedCellImg backed by this VolatileGlobalCellCache,
using the provided SimpleCacheArrayLoader to load data. |
void |
prepareNextFrame()
Prepare the cache for providing data for the "next frame",
by moving pending cell request to the prefetch queue
(
BlockingFetchQueues.clearToPrefetch()). |
protected final LoaderCache<VolatileGlobalCellCache.Key,Cell<?>> backingCache
public VolatileGlobalCellCache(int maxNumLevels,
int numFetcherThreads)
maxNumLevels - the highest occurring mipmap level plus 1.numFetcherThreads - how many threads should be created to load data.public VolatileGlobalCellCache(BlockingFetchQueues<Callable<?>> queue)
queue - queue to which asynchronous data loading jobs are submittedpublic void prepareNextFrame()
BlockingFetchQueues.clearToPrefetch()).prepareNextFrame in interface CacheControlpublic void clearCache()
public <T extends NativeType<T>,A> VolatileCachedCellImg<T,A> createImg(CellGrid grid, int timepoint, int setup, int level, CacheHints cacheHints, CacheArrayLoader<A> cacheArrayLoader, T type)
VolatileCachedCellImg backed by this VolatileGlobalCellCache,
using the provided CacheArrayLoader to load data.grid - timepoint - setup - level - cacheHints - cacheArrayLoader - type - public <T extends NativeType<T>,A> VolatileCachedCellImg<T,A> createImg(CellGrid grid, int timepoint, int setup, int level, CacheHints cacheHints, SimpleCacheArrayLoader<A> cacheArrayLoader, T type)
VolatileCachedCellImg backed by this VolatileGlobalCellCache,
using the provided SimpleCacheArrayLoader to load data.grid - timepoint - setup - level - cacheHints - cacheArrayLoader - type - Copyright © 2015–2021 Fiji. All rights reserved.