From 4679f1221c7eb4c75e9db2955716f6171ed918a3 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 17 Jan 2019 08:42:17 +0100 Subject: [PATCH] Update javadoc --- ...AbstractReadWriteCachedCellImgFactory.java | 21 +++++++++++++++++-- ...AbstractReadWriteCachedCellImgOptions.java | 2 +- .../cache/img/DiskCachedCellImgOptions.java | 5 ++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/imglib2/cache/img/AbstractReadWriteCachedCellImgFactory.java b/src/main/java/net/imglib2/cache/img/AbstractReadWriteCachedCellImgFactory.java index 60415f9..dd7f87a 100644 --- a/src/main/java/net/imglib2/cache/img/AbstractReadWriteCachedCellImgFactory.java +++ b/src/main/java/net/imglib2/cache/img/AbstractReadWriteCachedCellImgFactory.java @@ -54,6 +54,8 @@ * but leaves the implementation of the cell writing to specialized implementations. * * See {@link DiskCachedCellImgFactory} for a specialized example. + * + * @param Element type of the images that can be created by this factory * * @author Tobias Pietzsch * @author Carsten Haubold, KNIME GmbH, Konstanz, Germany @@ -80,6 +82,15 @@ public AbstractReadWriteCachedCellImgFactory(final T type) { /** * Create a cached cell img with the provided settings. Much of the work is deferred to abstract methods that * must be implemented for the specific writer-backend in specialized classes. + * + * @param dimensions Dimensions of the image that should be created + * @param cacheLoader Loader for already cached cells (optional) + * @param cellLoader Loader for Cells that are not cached yet (optional, cache will provide empty cells if this is null) + * @param type Instance of the element type of the image that should be created + * @param typeFactory A native type factory + * @param additionalOptions Cache options that extend this cache factory's options + * @param Access Type + * @return A CachedCellImg with the given cache configuration */ protected > CachedCellImg create(final long[] dimensions, final CacheLoader> cacheLoader, @@ -131,8 +142,14 @@ public AbstractReadWriteCachedCellImgFactory(final T type) { } /** - * Derived classes should create an instance of the CachedCellImg type that they support. + * Derived classes should create an instance of the CachedCellImg type that they support, given the provided cache and grid * E.g. a {@link DiskCachedCellImgFactory} would create and return a {@link DiskCachedCellImg}. + * + * @param grid The grid structure of the CellCache + * @param entitiesPerPixel + * @param cache The configured cache to use as backing for the image + * @param accessType + * @return A {@link CachedCellImg} */ protected abstract > CachedCellImg createCachedCellImg( final CellGrid grid, @@ -148,7 +165,7 @@ public AbstractReadWriteCachedCellImgFactory(final T type) { * @param backingLoader the backing loader for cache cells * @param type element type * @param entitiesPerPixel - * @return + * @return A {@link ReadWriteCellCache} */ protected abstract > ReadWriteCellCache createCellCache( final AbstractReadWriteCachedCellImgOptions options, diff --git a/src/main/java/net/imglib2/cache/img/AbstractReadWriteCachedCellImgOptions.java b/src/main/java/net/imglib2/cache/img/AbstractReadWriteCachedCellImgOptions.java index ef95c26..990aa93 100644 --- a/src/main/java/net/imglib2/cache/img/AbstractReadWriteCachedCellImgOptions.java +++ b/src/main/java/net/imglib2/cache/img/AbstractReadWriteCachedCellImgOptions.java @@ -34,7 +34,7 @@ import net.imglib2.cache.img.ReadOnlyCachedCellImgOptions.CacheType; /** - * Options base class used when constructing a cell image factory derived from {@link AbstractCachedCellImgFactory}. + * Options base class used when constructing a cell image factory derived from {@link AbstractReadWriteCachedCellImgFactory}. * This holds a set of default options shared by read-write-caches. Specialized writer-backends should provide their * own CachedCellImgFactory and -Options. * diff --git a/src/main/java/net/imglib2/cache/img/DiskCachedCellImgOptions.java b/src/main/java/net/imglib2/cache/img/DiskCachedCellImgOptions.java index e60c050..90b4e83 100644 --- a/src/main/java/net/imglib2/cache/img/DiskCachedCellImgOptions.java +++ b/src/main/java/net/imglib2/cache/img/DiskCachedCellImgOptions.java @@ -249,7 +249,7 @@ public DiskCachedCellImgOptions tempDirectoryPrefix( final String prefix ) *

*

* For safety reasons, only cell cache directories that are created by the - * {@link AbstractReadWriteCachedCellImgFactory} are actually marked for deletion. This + * {@link DiskCachedCellImgFactory} are actually marked for deletion. This * means that either no {@link #cacheDirectory(Path)} is specified (a * temporary directory is created), or the specified * {@link #cacheDirectory(Path)} does not exist yet. @@ -275,8 +275,7 @@ public DiskCachedCellImgOptions deleteCacheDirectoryOnExit( final boolean delete *

*

* This option only has an effect for {@link DiskCachedCellImg} that are - * created with a {@link CellLoader} - * ({@link AbstractReadWriteCachedCellImgFactory#create(long[], net.imglib2.type.NativeType, CellLoader)}). + * created with a {@link CellLoader} ({@link DiskCachedCellImgFactory#create(net.imglib2.Dimensions, CellLoader)}}) *

* * @param initializeAsDirty