Source Code Cross Referenced for StorageCache.java in  » Testing » PolePosition-0.20 » com » versant » core » storagemanager » 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 » Testing » PolePosition 0.20 » com.versant.core.storagemanager 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 1998 - 2005 Versant Corporation
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         * Versant Corporation - initial API and implementation
010:         */
011:        package com.versant.core.storagemanager;
012:
013:        import com.versant.core.server.CachedQueryResult;
014:        import com.versant.core.server.CompiledQuery;
015:        import com.versant.core.metadata.FetchGroup;
016:        import com.versant.core.metadata.ClassMetaData;
017:        import com.versant.core.metadata.ModelMetaData;
018:        import com.versant.core.common.OID;
019:        import com.versant.core.common.State;
020:        import com.versant.core.common.*;
021:
022:        /**
023:         * Cache of State's and query results shared by multiple StorageManager's.
024:         * A single class is used to cache both State's and query results so that
025:         * query results can be efficiently evicted when States of classes they
026:         * depend on are evicted. Only data read in a committed database transaction
027:         * may be added to the cache.
028:         */
029:        public interface StorageCache {
030:
031:            /**
032:             * This is invoked when the meta data is available.
033:             */
034:            public void setJDOMetaData(ModelMetaData jmd);
035:
036:            /**
037:             * Is the cache enabled?
038:             */
039:            public boolean isEnabled();
040:
041:            /**
042:             * Is query caching enabled?
043:             */
044:            public boolean isQueryCacheEnabled();
045:
046:            /**
047:             * Begin a cache transaction and return an identifier for it. This
048:             * must be called before a new database transaction is started.
049:             */
050:            public Object beginTx();
051:
052:            /**
053:             * End a cache transaction.
054:             */
055:            public void endTx(Object tx);
056:
057:            /**
058:             * Get the State for an OID or null if it is not in cache or does not
059:             * contain the fields in the fetchGroup. This returns a copy of the
060:             * data in the cache. If fetchGroup is null then if any state is
061:             * present it is returned.
062:             */
063:            public State getState(OID oid, FetchGroup fetchGroup);
064:
065:            /**
066:             * Does the cache contain any data for the oid? Note that the data could
067:             * be evicted at any time.
068:             */
069:            public boolean contains(OID oid);
070:
071:            /**
072:             * Get cached query results or null if there are none.
073:             * @param cq
074:             * @param params
075:             */
076:            public CachedQueryResult getQueryResult(CompiledQuery cq,
077:                    Object[] params);
078:
079:            /**
080:             * Get result count or -1 if there are none.
081:             * @param cq
082:             * @param params
083:             */
084:            public int getQueryResultCount(CompiledQuery cq, Object[] params);
085:
086:            /**
087:             * Add all the states in the container to the cache.
088:             */
089:            public void add(Object tx, StatesReturned container);
090:
091:            /**
092:             * Add query results to the cache.
093:             */
094:            public void add(Object tx, CompiledQuery cq, Object[] params,
095:                    CachedQueryResult queryData);
096:
097:            /**
098:             * Add query result count to the cache.
099:             */
100:            public void add(Object tx, CompiledQuery cq, Object[] params,
101:                    int count);
102:
103:            /**
104:             * Evict length OIDs from oids starting at offset. Expected is the total
105:             * number of OIDs we expect to evict in the transaction or 0 if this is
106:             * not known. This may be used to optimize cache storage allocation.
107:             */
108:            public void evict(Object tx, OID[] oids, int offset, int length,
109:                    int expected);
110:
111:            /**
112:             * Evict all data for the classes.
113:             */
114:            public void evict(Object tx, ClassMetaData[] classes, int classCount);
115:
116:            /**
117:             * Evict all data.
118:             */
119:            public void evictAll(Object tx);
120:
121:            /**
122:             * Evict any cached information for the query.
123:             */
124:            public void evict(Object tx, CompiledQuery cq, Object[] params);
125:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.