|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.resource.internal.cm.sql.cache.AbstractPreparedStatementCacheImpl
public abstract class AbstractPreparedStatementCacheImpl
Abstract class for the prepared statement cache implementation
| Field Summary | |
|---|---|
protected static org.objectweb.util.monolog.api.Logger |
cacheLogger
Logger |
static String |
LOCAL_STATISTIC_KEY
Local statistic key |
protected int |
maxPstmtCacheSize
max cache size |
protected int |
pstmtCacheSize
current cache size |
protected PreparedStatementCacheStatistics |
stats
Statistics |
| Fields inherited from interface org.ow2.jonas.resource.internal.cm.sql.cache.PreparedStatementCache |
|---|
CACHE_POLICY_LIST, CACHE_POLICY_MAP |
| Constructor Summary | |
|---|---|
AbstractPreparedStatementCacheImpl(int maxCacheSize,
PreparedStatementCacheStatistics pstmtStats,
org.objectweb.util.monolog.api.Logger logger)
Constructor |
|
| Method Summary | |
|---|---|
abstract void |
close()
Close logically the cache entries |
abstract void |
destroy()
Destroy the cache entries |
abstract PreparedStatementWrapper |
get(PreparedStatementWrapper psw)
Retrieve an entry in the cache |
int |
getMaxPstmtCacheSize()
Get the max pstmt cache size |
int |
getPstmtCacheSize()
Get the current pstmt cache size |
abstract String |
getState(String prefix)
Dump the pstmt cache state |
abstract void |
put(PreparedStatementWrapper psw)
Add an entry in the cache |
abstract void |
reallyClose()
Close really the cache entries |
void |
setMaxPstmtCacheSize(int maxSize)
Set the max pstmt cache size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.objectweb.util.monolog.api.Logger cacheLogger
protected int maxPstmtCacheSize
protected int pstmtCacheSize
protected PreparedStatementCacheStatistics stats
public static String LOCAL_STATISTIC_KEY
| Constructor Detail |
|---|
public AbstractPreparedStatementCacheImpl(int maxCacheSize,
PreparedStatementCacheStatistics pstmtStats,
org.objectweb.util.monolog.api.Logger logger)
maxCacheSize - : max cache sizelogger - : logger| Method Detail |
|---|
public abstract PreparedStatementWrapper get(PreparedStatementWrapper psw)
PreparedStatementCache
get in interface PreparedStatementCachepsw - : parameters of the prepared statement to retrieve
public abstract void put(PreparedStatementWrapper psw)
throws CacheException,
SQLException
PreparedStatementCache
put in interface PreparedStatementCachepsw - : wrapped prepared statement to add
CacheException - no more space in cache
SQLExceptionpublic final void setMaxPstmtCacheSize(int maxSize)
setMaxPstmtCacheSize in interface PreparedStatementCachemaxSize - The max size to set.public int getMaxPstmtCacheSize()
getMaxPstmtCacheSize in interface PreparedStatementCachepublic int getPstmtCacheSize()
getPstmtCacheSize in interface PreparedStatementCachepublic abstract String getState(String prefix)
getState in interface PreparedStatementCacheprefix - indentation
public abstract void destroy()
destroy in interface PreparedStatementCachepublic abstract void reallyClose()
reallyClose in interface PreparedStatementCachepublic abstract void close()
close in interface PreparedStatementCache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||