Java Doc for StatementCache.java in  » Database-JDBC-Connection-Pool » jTDS » net » sourceforge » jtds » jdbc » 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 JDBC Connection Pool » jTDS » net.sourceforge.jtds.jdbc.cache 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.sourceforge.jtds.jdbc.cache.StatementCache

All known Subclasses:   net.sourceforge.jtds.jdbc.cache.ProcedureCache,
StatementCache
public interface StatementCache (Code)
Interface for a statement cache. Abstraction of the caching mechanism by use of this interface will allow developers to create custom caching schemes that are optimal for their specific applications. Any synchronization required by an implementation should utilize the implementing object for the lock.

There are two types of attributes that the cache is concerned with:

statement key
String generated from the SQL query for which the prepared statement was created, the database name and the parameter types; this key uniquely identifies a server-side preparation of the statement and is used to retrieve the handle of the statement when it needs to be executed
temporary procedure name or sp_prepare or sp_cursorprepare handle on the server
One PreparedStatement can map to multiple handles, depending on the types of the parameters it is called with (hence the need to be able to map both keys and SQL strings to handles)
The cache can retrieve statement handles using statement keys.

The caching types provided by jTDS should be:

  • Arbitrary first un-latched (initial default until other caches are implemented)
  • Fast caching (never latches and never releases handles)
  • FIFO
  • LRU
  • No caching
  • Touch Count / Most Frequently Used

author:
   Brian Heineman
version:
   $Id: StatementCache.java,v 1.6 2007/07/11 19:57:06 bheineman Exp $




Method Summary
 Objectget(String key)
     Returns a statement handle associated with the specified key or null if the key specified does not have an associated statement handle.
 CollectiongetObsoleteHandles(Collection handles)
     Returns a Collection of obsolete statement handles that may be released, or null if no statement handles are obsolete.
 voidput(String key, Object handle)
     Places the specified statement handle in the cache for the given key.
 voidremove(String key)
     Removes a statement key and handle from the cache for the specified key.



Method Detail
get
Object get(String key)(Code)
Returns a statement handle associated with the specified key or null if the key specified does not have an associated statement handle.
Parameters:
  key - the statement key whose associated handle is to be returned statement handle



getObsoleteHandles
Collection getObsoleteHandles(Collection handles)(Code)
Returns a Collection of obsolete statement handles that may be released, or null if no statement handles are obsolete.
Parameters:
  handles - the statement handles that are no longer being used Collection of obsolete statement handles to beremoved



put
void put(String key, Object handle)(Code)
Places the specified statement handle in the cache for the given key. If a key already exists in the cache, the handle will be overwritten.
Parameters:
  key - the statement key to associated with the handle
Parameters:
  handle - the statement handle



remove
void remove(String key)(Code)
Removes a statement key and handle from the cache for the specified key.
Parameters:
  key - the statement key whose associated handle is to be removedfrom the cache



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