Source Code Cross Referenced for OptimisticCache.java in  » Database-ORM » hibernate » org » hibernate » 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 » hibernate » org.hibernate.cache 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        package org.hibernate.cache;
02:
03:        /**
04:         * A contract for transactional cache implementations which support
05:         * optimistic locking of items within the cache.
06:         * <p/>
07:         * The optimisitic locking capabilities are only utilized for
08:         * the entity cache regions.
09:         * <p/>
10:         * Unlike the methods on the {@link Cache} interface, all the methods
11:         * here will only ever be called from access scenarios where versioned
12:         * data is actually a possiblity (i.e., entity data).  Be sure to consult
13:         * with {@link OptimisticCacheSource#isVersioned()} to determine whether
14:         * versioning is actually in effect.
15:         *
16:         * @author Steve Ebersole
17:         */
18:        public interface OptimisticCache extends Cache {
19:            /**
20:             * Indicates the "source" of the cached data.  Currently this will
21:             * only ever represent an {@link org.hibernate.persister.entity.EntityPersister}.
22:             * <p/>
23:             * Made available to the cache so that it can access certain information
24:             * about versioning strategy.
25:             *
26:             * @param source The source.
27:             */
28:            public void setSource(OptimisticCacheSource source);
29:
30:            /**
31:             * Called during {@link CacheConcurrencyStrategy#insert} processing for
32:             * transactional strategies.  Indicates we have just performed an insert
33:             * into the DB and now need to cache that entity's data.
34:             *
35:             * @param key The cache key.
36:             * @param value The data to be cached.
37:             * @param currentVersion The entity's version; or null if not versioned.
38:             */
39:            public void writeInsert(Object key, Object value,
40:                    Object currentVersion);
41:
42:            /**
43:             * Called during {@link CacheConcurrencyStrategy#update} processing for
44:             * transactional strategies.  Indicates we have just performed an update
45:             * against the DB and now need to cache the updated state.
46:             *
47:             * @param key The cache key.
48:             * @param value The data to be cached.
49:             * @param currentVersion The entity's current version
50:             * @param previousVersion The entity's previous version (before the update);
51:             * or null if not versioned.
52:             */
53:            public void writeUpdate(Object key, Object value,
54:                    Object currentVersion, Object previousVersion);
55:
56:            /**
57:             * Called during {@link CacheConcurrencyStrategy#put} processing for
58:             * transactional strategies.  Indicates we have just loaded an entity's
59:             * state from the database and need it cached.
60:             *
61:             * @param key The cache key.
62:             * @param value The data to be cached.
63:             * @param currentVersion The entity's version; or null if not versioned.
64:             */
65:            public void writeLoad(Object key, Object value,
66:                    Object currentVersion);
67:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.