Skip to content
Snippets Groups Projects
Commit 54d5b8b6 authored by Tobias Pietzsch's avatar Tobias Pietzsch
Browse files

rename WeakSoftCache.getInstance() to newInstance() to avoid the impression...

rename WeakSoftCache.getInstance() to newInstance() to avoid the impression that this is a singleton.
parent 4a774e2c
Branches
Tags
No related merge requests found
......@@ -66,7 +66,7 @@ import bdv.img.cache.VolatileGlobalCellCache;
*/
public final class LoadingVolatileCache< K, V extends VolatileCacheValue > implements Cache
{
private final WeakSoftCache< K, Entry > cache = WeakSoftCache.getInstance();
private final WeakSoftCache< K, Entry > cache = WeakSoftCache.newInstance();
private final Object cacheLock = new Object();
......
......@@ -21,7 +21,13 @@ public interface WeakSoftCache< K, V >
*/
void invalidateAll();
public static < K, V > WeakSoftCache< K, V > getInstance()
/**
* Create a new {@link WeakSoftCache}.
* <p>
* This is here so we can swap out implementations easily and will probably
* be replaced by a scijava service later.
*/
public static < K, V > WeakSoftCache< K, V > newInstance()
{
return new WeakSoftCacheImp<>();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment