Constructor and Description |
---|
SynchronizedCache(Cache cacheImpl) |
Modifier and Type | Method and Description |
---|---|
void |
addToCache(CacheObjectKey key,
Object entry,
boolean force)
Add key and entry value into the cache.
|
Object |
checkAndUpdateCache(CacheObjectKey key)
Check if an entry is found for this key object.
|
void |
clearCache()
Clear statement cache
|
void |
flushCache()
Closing all statements in statement cache and flush the statement cache
of all the statements.
|
int |
getSize()
Get the size of statement cache
|
boolean |
isSynchronized()
Check if the statement cache is synchronized.
|
void |
purge()
Remove all statements stored in the statement cache after closing
the statement objects.
|
void |
purge(Object entry)
Remove the specified entry stored in the statement cache after closing
the statement object associated with this entry.
|
public SynchronizedCache(Cache cacheImpl)
public Object checkAndUpdateCache(CacheObjectKey key)
Cache
checkAndUpdateCache
in interface Cache
key
- whose mapping entry is to be checked.public void addToCache(CacheObjectKey key, Object entry, boolean force)
Cache
addToCache
in interface Cache
key
- that contains the sql string and its type (PS/CS)entry
- that is the wrapper of PreparedStatement or
CallableStatementforce
- If existing key is to be overwrittenpublic void clearCache()
Cache
clearCache
in interface Cache
public void purge()
Cache
public int getSize()
Cache
public boolean isSynchronized()
Cache
isSynchronized
in interface Cache
public void flushCache()
Cache
flushCache
in interface Cache
public void purge(Object entry)
Cache
Copyright © 2018. All rights reserved.