Source Code Cross Referenced for TestObjectManager.java in  » Net » Terracotta » com » tc » objectserver » impl » 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 » Net » Terracotta » com.tc.objectserver.impl 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
003:         * notice. All rights reserved.
004:         */
005:        package com.tc.objectserver.impl;
006:
007:        import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
008:
009:        import com.tc.exception.ImplementMe;
010:        import com.tc.exception.TCRuntimeException;
011:        import com.tc.net.groups.NodeID;
012:        import com.tc.object.ObjectID;
013:        import com.tc.objectserver.api.ObjectManager;
014:        import com.tc.objectserver.api.ObjectManagerEventListener;
015:        import com.tc.objectserver.api.ObjectManagerStatsListener;
016:        import com.tc.objectserver.context.ObjectManagerResultsContext;
017:        import com.tc.objectserver.core.api.GarbageCollector;
018:        import com.tc.objectserver.core.api.ManagedObject;
019:        import com.tc.objectserver.core.impl.TestManagedObject;
020:        import com.tc.objectserver.mgmt.ManagedObjectFacade;
021:        import com.tc.objectserver.persistence.api.PersistenceTransaction;
022:        import com.tc.text.PrettyPrinter;
023:        import com.tc.util.ObjectIDSet2;
024:        import com.tc.util.concurrent.NoExceptionLinkedQueue;
025:
026:        import java.util.Collection;
027:        import java.util.HashMap;
028:        import java.util.HashSet;
029:        import java.util.Iterator;
030:        import java.util.List;
031:        import java.util.Map;
032:        import java.util.Set;
033:
034:        public class TestObjectManager implements  ObjectManager {
035:
036:            public boolean makePending = false;
037:
038:            public TestObjectManager() {
039:                super ();
040:            }
041:
042:            public void stop() {
043:                throw new ImplementMe();
044:            }
045:
046:            public ManagedObjectFacade lookupFacade(ObjectID id) {
047:                throw new ImplementMe();
048:            }
049:
050:            public boolean lookupObjectsAndSubObjectsFor(NodeID nodeID,
051:                    ObjectManagerResultsContext context, int maxCount) {
052:                return basicLookup(nodeID, context, maxCount);
053:            }
054:
055:            public LinkedQueue lookupObjectForCreateIfNecessaryContexts = new LinkedQueue();
056:
057:            public boolean lookupObjectsFor(NodeID nodeID,
058:                    ObjectManagerResultsContext context) {
059:                Object[] args = new Object[] { nodeID, context };
060:                try {
061:                    lookupObjectForCreateIfNecessaryContexts.put(args);
062:                } catch (InterruptedException e) {
063:                    throw new TCRuntimeException(e);
064:                }
065:                return basicLookup(nodeID, context, -1);
066:            }
067:
068:            private boolean basicLookup(NodeID nodeID,
069:                    ObjectManagerResultsContext context, int i) {
070:                if (!makePending) {
071:                    context.setResults(new ObjectManagerLookupResultsImpl(
072:                            createLookResults(context.getLookupIDs())));
073:                }
074:                return !makePending;
075:            }
076:
077:            public void processPending(Object[] args) {
078:                basicLookup((NodeID) args[0],
079:                        (ObjectManagerResultsContext) args[1], -1);
080:            }
081:
082:            private Map createLookResults(Collection ids) {
083:                Map results = new HashMap();
084:                for (Iterator i = ids.iterator(); i.hasNext();) {
085:                    ObjectID id = (ObjectID) i.next();
086:                    TestManagedObject tmo = new TestManagedObject(id);
087:                    results.put(id, tmo);
088:                }
089:                return results;
090:            }
091:
092:            public Iterator getRoots() {
093:                throw new ImplementMe();
094:            }
095:
096:            public void createObject(ManagedObject object) {
097:                throw new ImplementMe();
098:            }
099:
100:            public void createRoot(String name, ObjectID id) {
101:                //
102:            }
103:
104:            public ObjectID lookupRootID(String name) {
105:                throw new ImplementMe();
106:            }
107:
108:            public void setGarbageCollector(GarbageCollector gc) {
109:                throw new ImplementMe();
110:            }
111:
112:            public void addListener(ObjectManagerEventListener listener) {
113:                throw new ImplementMe();
114:            }
115:
116:            public ManagedObject getObjectByID(ObjectID id) {
117:                throw new ImplementMe();
118:            }
119:
120:            public final LinkedQueue releaseContextQueue = new LinkedQueue();
121:
122:            public void release(PersistenceTransaction tx, ManagedObject object) {
123:                try {
124:                    releaseContextQueue.put(object);
125:                } catch (InterruptedException e) {
126:                    throw new TCRuntimeException(e);
127:                }
128:            }
129:
130:            public void releaseReadOnly(ManagedObject object) {
131:                try {
132:                    releaseContextQueue.put(object);
133:                } catch (InterruptedException e) {
134:                    throw new TCRuntimeException(e);
135:                }
136:            }
137:
138:            public final LinkedQueue releaseAllQueue = new LinkedQueue();
139:
140:            public void releaseAll(PersistenceTransaction tx,
141:                    Collection collection) {
142:                try {
143:                    releaseAllQueue.put(collection);
144:                } catch (InterruptedException e) {
145:                    throw new TCRuntimeException(e);
146:                }
147:            }
148:
149:            public PrettyPrinter prettyPrint(PrettyPrinter out) {
150:                throw new ImplementMe();
151:            }
152:
153:            public final NoExceptionLinkedQueue startCalls = new NoExceptionLinkedQueue();
154:
155:            public void start() {
156:                startCalls.put(new Object());
157:            }
158:
159:            public void setStatsListener(ObjectManagerStatsListener listener) {
160:                throw new ImplementMe();
161:            }
162:
163:            public void dump() {
164:                throw new ImplementMe();
165:            }
166:
167:            public void releaseAll(Collection objects) {
168:                releaseAll(null, objects);
169:            }
170:
171:            public int getCheckedOutCount() {
172:                return 0;
173:            }
174:
175:            public Set getRootIDs() {
176:                return new HashSet();
177:            }
178:
179:            public ObjectIDSet2 getAllObjectIDs() {
180:                return new ObjectIDSet2();
181:            }
182:
183:            public Object getLock() {
184:                return this ;
185:            }
186:
187:            public void addFaultedObject(ObjectID oid, ManagedObject mo,
188:                    boolean removeOnRelease) {
189:                throw new ImplementMe();
190:            }
191:
192:            public void waitUntilReadyToGC() {
193:                throw new ImplementMe();
194:            }
195:
196:            public void notifyGCComplete(Set toDelete) {
197:                throw new ImplementMe();
198:            }
199:
200:            public void flushAndEvict(List objects2Flush) {
201:                throw new ImplementMe();
202:            }
203:
204:            public Map getRootNamesToIDsMap() {
205:                throw new ImplementMe();
206:            }
207:
208:            public GarbageCollector getGarbageCollector() {
209:                throw new ImplementMe();
210:            }
211:
212:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.