T
- the pixel typeA
- the underlying native access typepublic class VolatileCachedCellImg<T extends NativeType<T>,A> extends AbstractCellImg<T,A,Cell<A>,VolatileCachedCellImg.VolatileCachedCells<Cell<A>>>
Modifier and Type | Class and Description |
---|---|
static interface |
VolatileCachedCellImg.Get<T> |
static class |
VolatileCachedCellImg.VolatileCachedCells<T> |
AbstractCellImg.CellImgSampler<C>
cells, grid
entitiesPerPixel, linkedType, numEntities
dimension, max, n, numPixels
Constructor and Description |
---|
VolatileCachedCellImg(CellGrid grid,
Fraction entitiesPerPixel,
Function<NativeImg<T,? super A>,T> typeFactory,
CacheHints cacheHints,
VolatileCachedCellImg.Get<Cell<A>> get) |
VolatileCachedCellImg(CellGrid grid,
T type,
CacheHints cacheHints,
VolatileCachedCellImg.Get<Cell<A>> get) |
Modifier and Type | Method and Description |
---|---|
Img<T> |
copy() |
ImgFactory<T> |
factory() |
CacheHints |
getDefaultCacheHints() |
void |
setCacheHints(CacheHints cacheHints)
Set
hints on how to handle cell requests for this
cache. |
copyDataTo, cursor, getCellGrid, getCells, iterationOrder, localizingCursor, randomAccess, update
createLinkedType, setLinkedType
dimension, dimensions, firstElement, iterator, max, max, max, min, min, min, numDimensions, numElements, randomAccess, realMax, realMax, realMax, realMin, realMin, realMin, size, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAt, getAt, getAt, randomAccess
firstElement, size
forEach, iterator, spliterator
dimension, max, max, max, maxAsLongArray, maxAsPoint, min, min, min, minAsLongArray, minAsPoint, realMax, realMin
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMin, realMin
allPositive, allPositive, dimensions, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositive
numDimensions
public VolatileCachedCellImg(CellGrid grid, Fraction entitiesPerPixel, Function<NativeImg<T,? super A>,T> typeFactory, CacheHints cacheHints, VolatileCachedCellImg.Get<Cell<A>> get)
public VolatileCachedCellImg(CellGrid grid, T type, CacheHints cacheHints, VolatileCachedCellImg.Get<Cell<A>> get)
public void setCacheHints(CacheHints cacheHints)
hints
on how to handle cell requests for this
cache. The hints comprise LoadingStrategy
, queue priority, and
queue order.
Whenever a cell is accessed its data may be invalid, meaning that the
cell data has not been loaded yet. In this case, the
LoadingStrategy
determines when the data should be loaded:
LoadingStrategy.VOLATILE
: Enqueue the cell for asynchronous
loading by a fetcher thread, if it has not been enqueued in the current
frame already.
LoadingStrategy.BLOCKING
: Load the cell data immediately.
LoadingStrategy.BUDGETED
: Load the cell data immediately if
there is enough IoTimeBudget
left for the current thread group.
Otherwise enqueue for asynchronous loading, if it has not been enqueued
in the current frame already.
LoadingStrategy.DONTLOAD
: Do nothing.
If a cell is enqueued, it is enqueued in the queue with the specified
queue priority
. Priorities are
consecutive integers 0 ... n-1, where 0 is the highest priority.
Requests with priority i < j will be handled before requests
with priority j.
Finally, the queue order
determines
whether the cell is enqueued to the front or to the back of the queue
with the specified priority.
Note, that the queues are cleared
whenever a new frame
is
rendered.
cacheHints
- describe handling of cell requests for this cache. May be
null
, in which case the default hints are restored.public CacheHints getDefaultCacheHints()
public ImgFactory<T> factory()
Copyright © 2015–2021 Fiji. All rights reserved.