public static enum CacheOptions.CacheType extends Enum<CacheOptions.CacheType>
Enum Constant and Description |
---|
BOUNDED
The cache keeps strong references to a limited number of values
(cells).
|
SOFTREF
The cache keeps SoftReferences to values (cells), basically relying
on GC for removal.
|
Modifier and Type | Method and Description |
---|---|
static CacheOptions.CacheType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CacheOptions.CacheType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CacheOptions.CacheType SOFTREF
OutOfMemoryError
may occur because SoftReference
s are
cleared too slow. SoftReferences are not collected for a certain time
after they have been used. If there is heavy thrashing with cells
being constantly swapped in and out from disk then OutOfMemory may
happen because of this. This sounds worse than it is in practice and
should only happen in pathological situations. Tuning the
-XX:SoftRefLRUPolicyMSPerMB
JVM flag does often help.public static final CacheOptions.CacheType BOUNDED
OutOfMemoryError
may occur if many caches are
opened and consume too much memory in total.public static CacheOptions.CacheType[] values()
for (CacheOptions.CacheType c : CacheOptions.CacheType.values()) System.out.println(c);
public static CacheOptions.CacheType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2015–2022 ImgLib2. All rights reserved.