|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
java.lang.Objectcom.ibatis.sqlmap.engine.cache.CacheModel
public class CacheModel
Wrapper for Caches.
字段摘要 | |
---|---|
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. |
构造器摘要 | |
---|---|
CacheModel()
Default constructor |
方法摘要 | |
---|---|
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 |
setCacheController(CacheController controller)
Sets up the controller for the cache model |
void |
setControllerProperties(java.util.Properties cacheProps)
|
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 |
类方法继承: java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
public static final java.lang.Object NULL_OBJECT
构造器详细信息 |
---|
public CacheModel()
方法详细信息 |
---|
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 valuepublic void setCacheController(CacheController controller) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
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 ExecuteListener
statement
- 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 loggedpublic void setControllerProperties(java.util.Properties cacheProps)
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |