Skip to content

Commit 28b1faf

Browse files
committed
Update javadoc
1 parent 3d1ad2f commit 28b1faf

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

src/main/java/net/imglib2/cache/img/AbstractReadWriteCachedCellImgFactory.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
* but leaves the implementation of the cell writing to specialized implementations.
5555
*
5656
* See {@link DiskCachedCellImgFactory} for a specialized example.
57+
*
58+
* @param <T> Element type of the images that can be created by this factory
5759
*
5860
* @author Tobias Pietzsch
5961
* @author Carsten Haubold, KNIME GmbH, Konstanz, Germany
@@ -80,6 +82,15 @@ public AbstractReadWriteCachedCellImgFactory(final T type) {
8082
/**
8183
* Create a cached cell img with the provided settings. Much of the work is deferred to abstract methods that
8284
* must be implemented for the specific writer-backend in specialized classes.
85+
*
86+
* @param dimensions Dimensions of the image that should be created
87+
* @param cacheLoader Loader for already cached cells (optional)
88+
* @param cellLoader Loader for Cells that are not cached yet (optional, cache will provide empty cells if this is null)
89+
* @param type Instance of the element type of the image that should be created
90+
* @param typeFactory A native type factory
91+
* @param additionalOptions Cache options that extend this cache factory's options
92+
* @param <A> Access Type
93+
* @return A CachedCellImg with the given cache configuration
8394
*/
8495
protected <A extends ArrayDataAccess<A>> CachedCellImg<T, ? extends A> create(final long[] dimensions,
8596
final CacheLoader<Long, ? extends Cell<?>> cacheLoader,
@@ -131,8 +142,14 @@ public AbstractReadWriteCachedCellImgFactory(final T type) {
131142
}
132143

133144
/**
134-
* Derived classes should create an instance of the CachedCellImg type that they support.
145+
* Derived classes should create an instance of the CachedCellImg type that they support, given the provided cache and grid
135146
* E.g. a {@link DiskCachedCellImgFactory} would create and return a {@link DiskCachedCellImg}.
147+
*
148+
* @param grid The grid structure of the CellCache
149+
* @param entitiesPerPixel
150+
* @param cache The configured cache to use as backing for the image
151+
* @param accessType
152+
* @return A {@link CachedCellImg}
136153
*/
137154
protected abstract <A extends ArrayDataAccess<A>> CachedCellImg<T, ? extends A> createCachedCellImg(
138155
final CellGrid grid,
@@ -148,7 +165,7 @@ public AbstractReadWriteCachedCellImgFactory(final T type) {
148165
* @param backingLoader the backing loader for cache cells
149166
* @param type element type
150167
* @param entitiesPerPixel
151-
* @return
168+
* @return A {@link ReadWriteCellCache}
152169
*/
153170
protected abstract <A extends ArrayDataAccess<A>> ReadWriteCellCache<A> createCellCache(
154171
final AbstractReadWriteCachedCellImgOptions options,

src/main/java/net/imglib2/cache/img/DiskCachedCellImgOptions.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public DiskCachedCellImgOptions tempDirectoryPrefix( final String prefix )
249249
* </p>
250250
* <p>
251251
* For safety reasons, only cell cache directories that are created by the
252-
* {@link AbstractReadWriteCachedCellImgFactory} are actually marked for deletion. This
252+
* {@link DiskCachedCellImgFactory} are actually marked for deletion. This
253253
* means that either no {@link #cacheDirectory(Path)} is specified (a
254254
* temporary directory is created), or the specified
255255
* {@link #cacheDirectory(Path)} does not exist yet.
@@ -275,8 +275,7 @@ public DiskCachedCellImgOptions deleteCacheDirectoryOnExit( final boolean delete
275275
* </p>
276276
* <p>
277277
* This option only has an effect for {@link DiskCachedCellImg} that are
278-
* created with a {@link CellLoader}
279-
* ({@link AbstractReadWriteCachedCellImgFactory#create(long[], net.imglib2.type.NativeType, CellLoader)}).
278+
* created with a {@link CellLoader} ({@link DiskCachedCellImgFactory#create(net.imglib2.Dimensions, CellLoader)}})
280279
* </p>
281280
*
282281
* @param initializeAsDirty

0 commit comments

Comments
 (0)