Class ScheduledCache
java.lang.Object
org.apache.ibatis.cache.decorators.ScheduledCache
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears this cache instance.boolean
getId()
int
getSize()
Optional.int
hashCode()
void
removeObject
(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.void
setClearInterval
(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
-
Field Details
-
clearInterval
protected long clearInterval -
lastClear
protected long lastClear
-
-
Constructor Details
-
ScheduledCache
-
-
Method Details
-
setClearInterval
public void setClearInterval(long clearInterval) -
getId
-
getSize
-
putObject
-
getObject
-
removeObject
Description copied from interface:Cache
As 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:
removeObject
in interfaceCache
- Parameters:
key
- The key- Returns:
- Not used
-
clear
-
hashCode
-
equals
-