public interface DiskCacheOptions<T> extends Options<T>
DiskCachedCellImg
.Modifier and Type | Interface and Description |
---|---|
static interface |
DiskCacheOptions.Val |
Modifier and Type | Method and Description |
---|---|
default T |
cacheDirectory(Path dir)
Set the path of the cell cache directory.
|
default T |
deleteCacheDirectoryOnExit(boolean deleteOnExit)
Specify whether the cell cache directory should be automatically deleted
when the virtual machine shuts down.
|
default T |
initializeCellsAsDirty(boolean initializeAsDirty)
Specify whether cells initialized by a
CellLoader should be
marked as dirty. |
default T |
maxIoQueueSize(int maxIoQueueSize)
Set the maximum size of the disk write queue.
|
default T |
numIoThreads(int numIoThreads)
The specified number of threads is started to handle asynchronous writing
of values that are evicted from the memory cache.
|
default T |
tempDirectory(Path dir)
Set the path to the directory in which to create the temporary cell cache
directory.
|
default T |
tempDirectoryPrefix(String prefix)
Set the prefix string to be used in generating the name of the temporary
cell cache directory.
|
default T numIoThreads(int numIoThreads)
numIoThreads
- how many writer threads to start (default is 1).default T maxIoQueueSize(int maxIoQueueSize)
Because processing of removed entries is done whenever the cache is accessed, this may also block accesses to the cache. (This is a good thing, because it avoids running out of memory because entries cannot be cleared fast enough...)
maxIoQueueSize
- the maximum size of the write queue (default is 10).default T cacheDirectory(Path dir)
This is null
by default, which means that a temporary directory
will be created.
Do not use the same cell cache directory for two images at the same time.
Set deleteCacheDirectoryOnExit(false)
if you do not want the cell
cache directory to be deleted when the virtual machine shuts down.
dir
- the path to the cell cache directory.default T tempDirectory(Path dir)
cacheDirectory(Path)
is
specified.
This is null
by default, which means that the default system
temporary-file directory is used.
dir
- the path to directory in which to create the temporary cell
cache directory.default T tempDirectoryPrefix(String prefix)
cacheDirectory(Path)
is specified.
This is "imglib2"
by default.
prefix
- the prefix string to be used in generating the name of the
temporary cell cache directory.default T deleteCacheDirectoryOnExit(boolean deleteOnExit)
This is true
by default.
For safety reasons, only cell cache directories that are created by the
DiskCachedCellImgFactory
are actually marked for deletion. This
means that either no cacheDirectory(Path)
is specified (a
temporary directory is created), or the specified
cacheDirectory(Path)
does not exist yet.
deleteOnExit
- whether the cell cache directory directory should be
automatically deleted when the virtual machine shuts down.default T initializeCellsAsDirty(boolean initializeAsDirty)
CellLoader
should be
marked as dirty. It is useful to set this to true
if
initialization is a costly operation. By this, it is made sure that cells
are initialized only once, and then written and retrieve from the disk
cache when they are next required.
This is false
by default.
This option only has an effect for DiskCachedCellImg
that are
created with a CellLoader
(DiskCachedCellImgFactory.create(long[], CellLoader)
).
initializeAsDirty
- whether cells initialized by a CellLoader
should be
marked as dirty.Copyright © 2015–2022 ImgLib2. All rights reserved.