Source Code Cross Referenced for ClassicStore.java in  » Database-DBMS » Ozone-1.1 » org » ozoneDB » core » classicStore » 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 DBMS » Ozone 1.1 » org.ozoneDB.core.classicStore 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // You can redistribute this software and/or modify it under the terms of
002:        // the Ozone Core License version 1 published by ozone-db.org.
003:        //
004:        // The original code and portions created by SMB are
005:        // Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
006:        //
007:        // $Id: ClassicStore.java,v 1.1 2001/12/18 10:31:30 per_nyfelt Exp $
008:
009:        package org.ozoneDB.core.classicStore;
010:
011:        import java.io.*;
012:        import org.ozoneDB.DxLib.*;
013:        import org.ozoneDB.*;
014:        import org.ozoneDB.core.*;
015:        import org.ozoneDB.util.*;
016:
017:        /**
018:         * ClassicStore acts as the mediator (director) of the classicStore module
019:         * especially for ClusterSpace, ObjectSpace, PersistentSpace. Currently it
020:         * serves only as container for the references but this should change in the
021:         * future to decouple class implementations.
022:         */
023:        public final class ClassicStore extends Object implements  Store {
024:            /** */
025:            protected Env env;
026:            protected ObjectSpace objectSpace;
027:
028:            /** */
029:            public ClassicStore() {
030:            }
031:
032:            /** */
033:            public void init(Env _env) {
034:                env = _env;
035:                objectSpace = new ObjectSpace(_env);
036:            }
037:
038:            /** */
039:            public void startup() throws Exception {
040:                env.logWriter.newEntry(this , "startup...", LogWriter.INFO);
041:                objectSpace.startup();
042:            }
043:
044:            /** */
045:            public void shutdown() throws Exception {
046:                env.logWriter.newEntry(this , "shutdown...", LogWriter.INFO);
047:                objectSpace.shutdown();
048:            }
049:
050:            /** */
051:            public ObjectContainer newContainer(Transaction ta,
052:                    OzoneCompatible target, ObjectID objID,
053:                    Permissions permissions) throws Exception {
054:                return objectSpace.newContainer(ta, target, objID, permissions);
055:            }
056:
057:            /** */
058:            public ObjectContainer containerForID(Transaction ta, ObjectID id)
059:                    throws Exception {
060:                return objectSpace.objectForID(id);
061:            }
062:
063:            /**
064:             * @param name The object name to search for.
065:             * @param ta
066:             * @return The object container for the name or null.
067:             */
068:            public ObjectContainer containerForName(Transaction ta, String name)
069:                    throws Exception {
070:                return objectSpace.objectForName(name);
071:            }
072:
073:            /**
074:             * @param ta
075:             * @param container
076:             * @param name
077:             */
078:            public void nameContainer(Transaction ta,
079:                    ObjectContainer container, String name)
080:                    throws PermissionDeniedExc {
081:                try {
082:                    objectSpace.nameObject(container, name);
083:                } catch (ClassicStoreExc e) {
084:                    throw new PermissionDeniedExc(e.toString());
085:                }
086:            }
087:
088:            /** */
089:            public void join(Transaction ta, ObjectContainer container,
090:                    int lockLevel) throws Exception {
091:                //System.out.println ("join: " + container.id());
092:                ClassicObjectContainer classicCon = (ClassicObjectContainer) container;
093:                classicCon.upgradeLockLevel(ta, lockLevel);
094:                ta.idTable.addForKey(classicCon, classicCon.id());
095:            }
096:
097:            /**
098:             * @param ta Transaction that will be commited.
099:             */
100:            public void prepareCommitTransaction(Transaction ta)
101:                    throws Exception {
102:                objectSpace.prepareCommitObjects(ta);
103:            }
104:
105:            /** */
106:            public void commitTransaction(Transaction ta) {
107:                objectSpace.commitObjects(ta);
108:            }
109:
110:            /**
111:             * @param ta ID of the comitting transaction.
112:             * @param created
113:             * @param modified
114:             */
115:            public void abortTransaction(Transaction ta) {
116:                try {
117:                    objectSpace.abortObjects(ta);
118:                } catch (Exception e) {
119:                    env.logWriter.newEntry(this , "Abort of transaction "
120:                            + ta.taID() + " failed !\n" + e, LogWriter.ERROR);
121:                }
122:            }
123:
124:            /** */
125:            public void upgradeLockLevel(Transaction ta,
126:                    ObjectContainer container, int lockLevel) throws Exception {
127:                ((ClassicObjectContainer) container).upgradeLockLevel(ta,
128:                        lockLevel);
129:            }
130:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.