Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in Dresden in December 2018, we've been working on a N5 backend for the
DiskCachedCellImg
. To prepare for that, I have refactored theDiskCachedCellImgFactory
andDiskCachedCellImgOptions
to allow for better extensibility and reuse. Their external interface remains (nearly) unchanged.The two main (internal) changes are:
AbstractReadWriteCachedCellImgFactory
andAbstractReadWriteCachedCellImgOptions
that hold the code that can be shared by different read-write-cache implementations. Concrete subclasses must implement abstract methods that encapsulate backend-specific things like CellCache creation.DiskCachedCellImgOptions extends AbstractReadWriteCachedCellImgOptions extends ReadOnlyCachedCellImgOptions
API change:
DiskCachedCellImgOptions.values
is now private, use the new methodvalues()
instead to get access to the values.CacheType
has moved fromDiskCachedCellImgOptions
toReadOnlyCachedCellImgOptions
because that is its first usage in the inheritance hierarchy.Notes:
imglib2-cache-examples
to verify that the caches still work as expected.n5-imglib
provides aN5CellLoader
that we reuse instead of reimplementing it, butn5-imglib
at the same time depends onimglib2-cache
. To prevent cyclic dependencies, I have put theN5CachedCellImg
into its own maven project.IoSync
instance across multiple caches. I did not add an interface for this yet.Flushable
version of theGuardedStrongRefLoaderRemoverCache
to be able to trigger writing of all in-memory cache blocks to disk. This is not handled in this PR orimglib2-cache-n5
yet.