Class SerializedCache
- java.lang.Object
-
- org.apache.ibatis.cache.decorators.SerializedCache
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SerializedCache.CustomObjectInputStream
-
Constructor Summary
Constructors Constructor Description SerializedCache(Cache delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears this cache instance.boolean
equals(Object obj)
String
getId()
Object
getObject(Object key)
int
getSize()
Optional.int
hashCode()
void
putObject(Object key, Object object)
Object
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.-
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
-
SerializedCache
public SerializedCache(Cache delegate)
-
-
Method Detail
-
getId
public String getId()
-
getSize
public int getSize()
Description copied from interface:Cache
Optional. This method is not called by the core.
-
removeObject
public Object removeObject(Object key)
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
public void clear()
Description copied from interface:Cache
Clears this cache instance.
-
-