Class ScheduledCache
- java.lang.Object
-
- org.apache.ibatis.cache.decorators.ScheduledCache
-
-
Field Summary
Fields Modifier and Type Field Description protected longclearIntervalprotected longlastClear
-
Constructor Summary
Constructors Constructor Description ScheduledCache(Cache delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears this cache instance.booleanequals(Object obj)StringgetId()ObjectgetObject(Object key)intgetSize()Optional.inthashCode()voidputObject(Object key, Object object)ObjectremoveObject(Object key)As of 3.3.0 this method is only called during a rollback for any previous value that was missing in the cache.voidsetClearInterval(long clearInterval)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ibatis.cache.Cache
getReadWriteLock
-
-
-
-
Constructor Detail
-
ScheduledCache
public ScheduledCache(Cache delegate)
-
-
Method Detail
-
setClearInterval
public void setClearInterval(long clearInterval)
-
getId
public String getId()
-
getSize
public int getSize()
Description copied from interface:CacheOptional. This method is not called by the core.
-
removeObject
public Object removeObject(Object key)
Description copied from interface:CacheAs of 3.3.0 this method is only called during a rollback for any previous value that was missing in the cache. This lets any blocking cache to release the lock that may have previously put on the key. A blocking cache puts a lock when a value is null and releases it when the value is back again. This way other threads will wait for the value to be available instead of hitting the database.- Specified by:
removeObjectin interfaceCache- Parameters:
key- The key- Returns:
- Not used
-
clear
public void clear()
Description copied from interface:CacheClears this cache instance.
-
-