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 net.imglib2.cache.LoaderCache<VolatileGlobalCellCache.Key,net.imglib2.img.cell.Cell<?>> |
backingCache |
| Constructor and Description |
|---|
VolatileGlobalCellCache(net.imglib2.cache.queue.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.
|
<T extends net.imglib2.type.NativeType<T>,A extends net.imglib2.img.basictypeaccess.DataAccess> |
createImg(net.imglib2.img.cell.CellGrid grid,
int timepoint,
int setup,
int level,
net.imglib2.cache.volatiles.CacheHints cacheHints,
CacheArrayLoader<A> cacheArrayLoader,
T type)
Create a
VolatileCachedCellImg backed by this VolatileGlobalCellCache,
using the provided CacheArrayLoader to load data. |
<T extends net.imglib2.type.NativeType<T>,A extends net.imglib2.img.basictypeaccess.DataAccess> |
createImg(net.imglib2.img.cell.CellGrid grid,
int timepoint,
int setup,
int level,
net.imglib2.cache.volatiles.CacheHints cacheHints,
SimpleCacheArrayLoader<A> cacheArrayLoader,
T type)
Create a
VolatileCachedCellImg backed by this VolatileGlobalCellCache,
using the provided SimpleCacheArrayLoader to load data. |
void |
ensureNumPriorities(int numPriorities)
Make sure that the
fetch queue has at least
numPriorities priority levels. |
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 net.imglib2.cache.LoaderCache<VolatileGlobalCellCache.Key,net.imglib2.img.cell.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(net.imglib2.cache.queue.BlockingFetchQueues<Callable<?>> queue)
queue - queue to which asynchronous data loading jobs are submittedpublic void prepareNextFrame()
BlockingFetchQueues.clearToPrefetch()).prepareNextFrame in interface CacheControlpublic void ensureNumPriorities(int numPriorities)
fetch queue has at least
numPriorities priority levels.
Typically, numPriorities should be the number of mipmap levels.
Then loading of lower-resolution blocks can be prioritized over
higher-resolution blocks.
public void clearCache()
Note that there may be pending cell requests which will re-populate the cache unless the fetch queue is cleared as well.
public <T extends net.imglib2.type.NativeType<T>,A extends net.imglib2.img.basictypeaccess.DataAccess> VolatileCachedCellImg<T,A> createImg(net.imglib2.img.cell.CellGrid grid, int timepoint, int setup, int level, net.imglib2.cache.volatiles.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 net.imglib2.type.NativeType<T>,A extends net.imglib2.img.basictypeaccess.DataAccess> VolatileCachedCellImg<T,A> createImg(net.imglib2.img.cell.CellGrid grid, int timepoint, int setup, int level, net.imglib2.cache.volatiles.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 © 2012–2025 BigDataViewer. All rights reserved.