|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibatis.sqlmap.engine.cache.CacheModel
Wrapper for Caches.
| Field Summary | |
static java.lang.Object |
NULL_OBJECT
This is used to represent null objects that are returned from the cache so that they can be cached, too. |
| Constructor Summary | |
CacheModel()
Default constructor |
|
| Method Summary | |
void |
addFlushTriggerStatement(java.lang.String statementName)
Adds a flushTriggerStatment. |
void |
configure(java.util.Properties props)
Configures the cache |
void |
flush()
Clears the cache |
long |
getFlushInterval()
Getter for flushInterval property |
long |
getFlushIntervalSeconds()
Getter for flushInterval property |
java.util.Iterator |
getFlushTriggerStatementNames()
Gets an Iterator containing all flushTriggerStatment objects for this cache. |
double |
getHitRatio()
Returns statistical information about the cache. |
java.lang.String |
getId()
Getter for the cache model's id |
protected int |
getMaxObjectLogSize()
Get the maximum size of an object in the log output. |
java.lang.Object |
getObject(CacheKey key)
Get an object out of the cache. |
java.lang.String |
getResource()
Getter for resource property |
boolean |
isReadOnly()
Getter for read-only property |
boolean |
isSerialize()
Getter to tell if the cache serializes |
protected void |
log(java.lang.String action,
boolean addValue,
java.lang.Object cacheValue)
Log a cache action. |
void |
onExecuteStatement(MappedStatement statement)
ExecuteListener event. |
void |
putObject(CacheKey key,
java.lang.Object value)
Add an object to the cache |
void |
setControllerClassName(java.lang.String implementation)
Sets up the controller for the cache model |
void |
setFlushInterval(long flushInterval)
Setter for flushInterval property |
void |
setId(java.lang.String id)
Setter for the cache model's id |
void |
setReadOnly(boolean readOnly)
Setter for read-only property |
void |
setResource(java.lang.String resource)
Setter for resource property |
void |
setSerialize(boolean serialize)
Setter to tell the cache to serialize objects |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.Object NULL_OBJECT
| Constructor Detail |
public CacheModel()
| Method Detail |
public java.lang.String getId()
public void setId(java.lang.String id)
id - - the new idpublic boolean isReadOnly()
public void setReadOnly(boolean readOnly)
readOnly - - the new settingpublic boolean isSerialize()
public void setSerialize(boolean serialize)
serialize - - if the cache model is to serialize objectspublic java.lang.String getResource()
public void setResource(java.lang.String resource)
resource - - the new value
public void setControllerClassName(java.lang.String implementation)
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
implementation - - the class (FQCN) for the controller
java.lang.ClassNotFoundException - - if the class cannot be found
java.lang.InstantiationException - - if the class cannot be instantiated
java.lang.IllegalAccessException - - if the classes constructor is not accessiblepublic long getFlushInterval()
public long getFlushIntervalSeconds()
public void setFlushInterval(long flushInterval)
flushInterval - The new flushInterval (in milliseconds)public void addFlushTriggerStatement(java.lang.String statementName)
statementName - The statement to add.public java.util.Iterator getFlushTriggerStatementNames()
public void onExecuteStatement(MappedStatement statement)
onExecuteStatement in interface ExecuteListenerstatement - The statement to executepublic double getHitRatio()
public void configure(java.util.Properties props)
props - public void flush()
public java.lang.Object getObject(CacheKey key)
key - The key of the object to be returned
public void putObject(CacheKey key,
java.lang.Object value)
key - The key of the object to be cachedvalue - The object to be cachedprotected int getMaxObjectLogSize()
protected void log(java.lang.String action,
boolean addValue,
java.lang.Object cacheValue)
action - String to outputaddValue - Add the value being cached to the logcacheValue - The value being logged
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||