- java.lang.Object
-
- org.ojalgo.type.TypeCache<T>
-
- All Implemented Interfaces:
ForgetfulMap.ValueCache<T>
@Deprecated public abstract class TypeCache<T> extends java.lang.Object implements ForgetfulMap.ValueCache<T>
Deprecated.v56 UseForgetfulMap.newValueCache(Object, java.util.function.Function)instead.A supplier that most of the time returns a cached value, and only recomputes it when necessary (periodically).
-
-
Field Summary
Fields Modifier and Type Field Description private TmyCachedObjectDeprecated.private booleanmyDirtyDeprecated.private static java.util.TimerTIMERDeprecated.
-
Constructor Summary
Constructors Modifier Constructor Description privateTypeCache()Deprecated.TypeCache(long aPurgeIntervalMeassure, CalendarDateUnit aPurgeIntervalUnit)Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidflushCache()Deprecated.TgetCachedObject()Deprecated.booleanisCacheSet()Deprecated.Is there currently a value cached for this key?booleanisDirty()Deprecated.voidmakeDirty()Deprecated.Will force re-creation of the value the next timeForgetfulMap.ValueCache.getCachedObject()is called.protected abstract TrecreateCache()Deprecated.
-
-
-
Field Detail
-
TIMER
private static final java.util.Timer TIMER
Deprecated.
-
myCachedObject
private transient volatile T myCachedObject
Deprecated.
-
myDirty
private volatile boolean myDirty
Deprecated.
-
-
Constructor Detail
-
TypeCache
public TypeCache(long aPurgeIntervalMeassure, CalendarDateUnit aPurgeIntervalUnit)Deprecated.
-
TypeCache
private TypeCache()
Deprecated.
-
-
Method Detail
-
flushCache
public final void flushCache()
Deprecated.- Specified by:
flushCachein interfaceForgetfulMap.ValueCache<T>
-
getCachedObject
public final T getCachedObject()
Deprecated.- Specified by:
getCachedObjectin interfaceForgetfulMap.ValueCache<T>
-
isCacheSet
public final boolean isCacheSet()
Deprecated.Description copied from interface:ForgetfulMap.ValueCacheIs there currently a value cached for this key?- Specified by:
isCacheSetin interfaceForgetfulMap.ValueCache<T>
-
isDirty
public final boolean isDirty()
Deprecated.- Specified by:
isDirtyin interfaceForgetfulMap.ValueCache<T>- Returns:
- true if
ForgetfulMap.ValueCache.makeDirty()has been called since the last timeForgetfulMap.ValueCache.getCachedObject()was called.
-
makeDirty
public final void makeDirty()
Deprecated.Description copied from interface:ForgetfulMap.ValueCacheWill force re-creation of the value the next timeForgetfulMap.ValueCache.getCachedObject()is called. This method does NOT immediately remove or invalidate the value from the underlying cache.- Specified by:
makeDirtyin interfaceForgetfulMap.ValueCache<T>
-
recreateCache
protected abstract T recreateCache()
Deprecated.
-
-