Java Doc for CacheModel.java in  » Database-ORM » iBATIS » com » ibatis » sqlmap » engine » cache » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » iBATIS » com.ibatis.sqlmap.engine.cache 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibatis.sqlmap.engine.cache.CacheModel

CacheModel
public class CacheModel implements ExecuteListener(Code)
Wrapper for Caches.


Field Summary
final public static  ObjectNULL_OBJECT
     This is used to represent null objects that are returned from the cache so that they can be cached, too.

Constructor Summary
public  CacheModel()
    

Method Summary
public  voidaddFlushTriggerStatement(String statementName)
     Adds a flushTriggerStatment.
public  voidconfigure(Properties props)
    
public  voidflush()
    
public  longgetFlushInterval()
    
public  longgetFlushIntervalSeconds()
    
public  IteratorgetFlushTriggerStatementNames()
     Gets an Iterator containing all flushTriggerStatment objects for this cache.
public  doublegetHitRatio()
     Returns statistical information about the cache.
public  StringgetId()
    
protected  intgetMaxObjectLogSize()
     Get the maximum size of an object in the log output.
public  ObjectgetObject(CacheKey key)
     Get an object out of the cache.
public  StringgetResource()
    
public  booleanisReadOnly()
    
public  booleanisSerialize()
    
protected  voidlog(String action, boolean addValue, Object cacheValue)
     Log a cache action.
public  voidonExecuteStatement(MappedStatement statement)
     ExecuteListener event.
public  voidputObject(CacheKey key, Object value)
    
public  voidsetControllerClassName(String implementation)
    
public  voidsetFlushInterval(long flushInterval)
    
public  voidsetId(String id)
    
public  voidsetReadOnly(boolean readOnly)
    
public  voidsetResource(String resource)
    
public  voidsetSerialize(boolean serialize)
    

Field Detail
NULL_OBJECT
final public static Object NULL_OBJECT(Code)
This is used to represent null objects that are returned from the cache so that they can be cached, too.




Constructor Detail
CacheModel
public CacheModel()(Code)
Default constructor




Method Detail
addFlushTriggerStatement
public void addFlushTriggerStatement(String statementName)(Code)
Adds a flushTriggerStatment. When a flushTriggerStatment is executed, the cache is flushed (cleared).
Parameters:
  statementName - The statement to add.



configure
public void configure(Properties props)(Code)
Configures the cache
Parameters:
  props -



flush
public void flush()(Code)
Clears the cache



getFlushInterval
public long getFlushInterval()(Code)
Getter for flushInterval property The flushInterval (in milliseconds)



getFlushIntervalSeconds
public long getFlushIntervalSeconds()(Code)
Getter for flushInterval property The flushInterval (in milliseconds)



getFlushTriggerStatementNames
public Iterator getFlushTriggerStatementNames()(Code)
Gets an Iterator containing all flushTriggerStatment objects for this cache. The Iterator



getHitRatio
public double getHitRatio()(Code)
Returns statistical information about the cache. the number of cache hits divided by the total requests



getId
public String getId()(Code)
Getter for the cache model's id the id



getMaxObjectLogSize
protected int getMaxObjectLogSize()(Code)
Get the maximum size of an object in the log output. Maximum size of a logged object in the output



getObject
public Object getObject(CacheKey key)(Code)
Get an object out of the cache. A side effect of this method is that is may clear the cache if it has not been cleared in the flushInterval.
Parameters:
  key - The key of the object to be returned The cached object (or null)



getResource
public String getResource()(Code)
Getter for resource property the value of the resource property



isReadOnly
public boolean isReadOnly()(Code)
Getter for read-only property true if a read-only model



isSerialize
public boolean isSerialize()(Code)
Getter to tell if the cache serializes true if the cache model serializes objects



log
protected void log(String action, boolean addValue, Object cacheValue)(Code)
Log a cache action. Since this method is pretty heavy weight, it's best to enclose it with a log.isDebugEnabled() when called.
Parameters:
  action - String to output
Parameters:
  addValue - Add the value being cached to the log
Parameters:
  cacheValue - The value being logged



onExecuteStatement
public void onExecuteStatement(MappedStatement statement)(Code)
ExecuteListener event. This will be called by a MappedStatement for which this cache is registered as a ExecuteListener. It will be called each time an executeXXXXXX method is called. In the case of the Cache class, it is registered in order to flush the cache whenever a certain statement is executed. (i.e. the flushOnExecute cache policy)
Parameters:
  statement - The statement to execute



putObject
public void putObject(CacheKey key, Object value)(Code)
Add an object to the cache
Parameters:
  key - The key of the object to be cached
Parameters:
  value - The object to be cached



setControllerClassName
public void setControllerClassName(String implementation) throws ClassNotFoundException, InstantiationException, IllegalAccessException(Code)
Sets up the controller for the cache model
Parameters:
  implementation - - the class (FQCN) for the controller
throws:
  ClassNotFoundException - - if the class cannot be found
throws:
  InstantiationException - - if the class cannot be instantiated
throws:
  IllegalAccessException - - if the classes constructor is not accessible



setFlushInterval
public void setFlushInterval(long flushInterval)(Code)
Setter for flushInterval property
Parameters:
  flushInterval - The new flushInterval (in milliseconds)



setId
public void setId(String id)(Code)
Setter for the cache model's id
Parameters:
  id - - the new id



setReadOnly
public void setReadOnly(boolean readOnly)(Code)
Setter for read-only property
Parameters:
  readOnly - - the new setting



setResource
public void setResource(String resource)(Code)
Setter for resource property
Parameters:
  resource - - the new value



setSerialize
public void setSerialize(boolean serialize)(Code)
Setter to tell the cache to serialize objects
Parameters:
  serialize - - if the cache model is to serialize objects



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.