Source Code Cross Referenced for AdminObjectContainer.java in  » Database-DBMS » Ozone-1.1 » org » ozoneDB » core » admin » 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.admin 
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: AdminObjectContainer.java,v 1.2 2002/06/08 00:49:39 mediumnet Exp $
008:
009:        package org.ozoneDB.core.admin;
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:         * @author <a href="http://www.softwarebuero.de/">SMB</a>
019:         * @version $Revision: 1.2 $Date: 2002/06/08 00:49:39 $
020:         */
021:        public class AdminObjectContainer extends AbstractObjectContainer {
022:
023:            protected final static long serialVersionUID = 1L;
024:
025:            protected Env env;
026:
027:            protected OzoneCompatible target;
028:
029:            protected ObjectID objID;
030:
031:            protected String name;
032:
033:            protected Lock lock;
034:
035:            protected Permissions permissions;
036:
037:            public AdminObjectContainer() {
038:            }
039:
040:            public AdminObjectContainer(Env _env, OzoneCompatible _target,
041:                    ObjectID _objID) {
042:                state = STATE_CREATED;
043:                target = _target;
044:                objID = _objID;
045:                env = _env;
046:                env.logWriter.newEntry(this , "admin container created...",
047:                        LogWriter.INFO);
048:            }
049:
050:            public long modTime() {
051:                throw new RuntimeException("Not supported: modTime()");
052:            }
053:
054:            public Class targetClass() {
055:                return target.getClass();
056:            }
057:
058:            public void setTarget(OzoneCompatible _target) {
059:                if (target != null) {
060:                    target.setContainer(null);
061:                }
062:                target = _target;
063:                target.setContainer(this );
064:            }
065:
066:            public OzoneCompatible target() {
067:                return target;
068:            }
069:
070:            public void touch() {
071:            }
072:
073:            public Lock lock() {
074:                return lock;
075:            }
076:
077:            public void updateLockLevel(Transaction ta) throws Exception {
078:                if (env.logWriter.hasTarget(LogWriter.DEBUG3)) {
079:                    env.logWriter.newEntry(this , "upgradeLockLevel(): ",
080:                            LogWriter.DEBUG3);
081:                }
082:                throw new RuntimeException("Not supported: updateLockLevel()");
083:            }
084:
085:            public Permissions permissions() {
086:                return permissions;
087:            }
088:
089:            public int lockLevel(Transaction ta) {
090:                return lock.level(ta);
091:            }
092:
093:            public Object invokeTarget(Env env, String methodName, String sig,
094:                    Object[] args) throws Exception {
095:                if (env.logWriter.hasTarget(LogWriter.DEBUG3)) {
096:                    env.logWriter.newEntry(this , "invokeTarget(): ",
097:                            LogWriter.DEBUG3);
098:                }
099:                return super .invokeTarget(env, methodName, sig, args);
100:            }
101:
102:            public void deleteTarget() {
103:                if (env.logWriter.hasTarget(LogWriter.DEBUG3)) {
104:                    env.logWriter.newEntry(this , "deleteTarget(): ",
105:                            LogWriter.DEBUG3);
106:                }
107:                throw new RuntimeException("Not supported: deleteTarget()");
108:            }
109:
110:            public void nameTarget(String _name) {
111:                if (env.logWriter.hasTarget(LogWriter.DEBUG3)) {
112:                    env.logWriter.newEntry(this , "nameTarget(): ",
113:                            LogWriter.DEBUG3);
114:                }
115:                throw new RuntimeException("Not supported: nameTarget()");
116:            }
117:
118:            public DxCollection allLockers() {
119:                throw new RuntimeException("Not supported: allLockers()");
120:            }
121:
122:            public boolean equals(Object obj) {
123:                if (obj != null && obj instanceof  AdminObjectContainer) {
124:                    AdminObjectContainer rhs = (AdminObjectContainer) obj;
125:                    return objID.equals(rhs.objID);
126:                }
127:                return false;
128:            }
129:
130:            public ObjectID id() {
131:                return objID;
132:            }
133:
134:            public String name() {
135:                return name;
136:            }
137:
138:            public void setName(String _name) {
139:                name = _name;
140:            }
141:
142:            /**
143:            	Pins this ObjectContainer.
144:            	Every caller of this method must pair this call with a call to {@link #unpin}.
145:            	An ObjectContainer remains in main memory at least as long as it is pinned.
146:             */
147:            public void pin() {
148:            }
149:
150:            /**
151:            	Unpins this ObjectContainer.
152:            	This method must be called exactly once for every call to {@link #pin}.
153:             */
154:            public void unpin() {
155:            }
156:
157:            /**
158:            	Returns wether this ObjectContainer is pinned.
159:             */
160:            public boolean isPinned() {
161:                return false;
162:            }
163:
164:            /**
165:            	Ensures that the garbageCollectionLevel is at least the given currentGarbageCollectionLevel.
166:            	The return value is meaningful if the supplied newGarbageCollectionLevel is the currentGarbageCollectionLevel
167:
168:            	@return
169:            		<=0 if this object still has to be processed.
170:            			This is the case if it belongs to the surelyReachable set but not to the processedReachable set
171:            		> otherwise
172:
173:            		<0 if this object has been updated
174:            		=0 if this object has not been updated, it is surelyReachable
175:            		>0 if this object has not been updated, it is processedReachable
176:             */
177:            public int ensureGarbageCollectionLevel(
178:                    int newGarbageCollectionLevel) {
179:                return 1;
180:            }
181:
182:            /**
183:            	Returns the garbageCollectionLevel this ObjectContainer has reached due to (not) calling {@link #ensureGarbageCollectionLevel}.
184:             */
185:            public int getGarbageCollectionLevel() {
186:                // Hope this will never be called.
187:                return 0;
188:            }
189:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.