Skip to content

Commit

Permalink
Update javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
chaubold committed Jan 17, 2019
1 parent 3d1ad2f commit 28b1faf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
* but leaves the implementation of the cell writing to specialized implementations.
*
* See {@link DiskCachedCellImgFactory} for a specialized example.
*
* @param <T> Element type of the images that can be created by this factory
*
* @author Tobias Pietzsch
* @author Carsten Haubold, KNIME GmbH, Konstanz, Germany
Expand All @@ -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 <A> Access Type
* @return A CachedCellImg with the given cache configuration
*/
protected <A extends ArrayDataAccess<A>> CachedCellImg<T, ? extends A> create(final long[] dimensions,
final CacheLoader<Long, ? extends Cell<?>> cacheLoader,
Expand Down Expand Up @@ -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 <A extends ArrayDataAccess<A>> CachedCellImg<T, ? extends A> createCachedCellImg(
final CellGrid grid,
Expand All @@ -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 <A extends ArrayDataAccess<A>> ReadWriteCellCache<A> createCellCache(
final AbstractReadWriteCachedCellImgOptions options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public DiskCachedCellImgOptions tempDirectoryPrefix( final String prefix )
* </p>
* <p>
* 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.
Expand All @@ -275,8 +275,7 @@ public DiskCachedCellImgOptions deleteCacheDirectoryOnExit( final boolean delete
* </p>
* <p>
* 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)}})
* </p>
*
* @param initializeAsDirty
Expand Down

0 comments on commit 28b1faf

Please sign in to comment.