Source Code Cross Referenced for TestLockManager.java in  » Net » Terracotta » com » tc » objectserver » lockmanager » api » 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.lockmanager.api 
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.lockmanager.api;
006:
007:        import com.tc.async.api.Sink;
008:        import com.tc.exception.ImplementMe;
009:        import com.tc.net.groups.NodeID;
010:        import com.tc.object.lockmanager.api.LockContext;
011:        import com.tc.object.lockmanager.api.LockID;
012:        import com.tc.object.lockmanager.api.ThreadID;
013:        import com.tc.object.tx.WaitInvocation;
014:
015:        import java.util.ArrayList;
016:        import java.util.Collection;
017:        import java.util.Iterator;
018:        import java.util.List;
019:        import java.util.Set;
020:
021:        public class TestLockManager implements  LockManager {
022:
023:            public final List reestablishLockCalls = new ArrayList();
024:            public final List reestablishWaitCalls = new ArrayList();
025:            public final List startCalls = new ArrayList();
026:            public final List notifyCalls = new ArrayList();
027:
028:            public void notify(LockID lid, NodeID cid, ThreadID tid,
029:                    boolean all, NotifiedWaiters addNotifiedWaitersTo) {
030:                notifyCalls.add(new Object[] { lid, cid, tid, new Boolean(all),
031:                        addNotifiedWaitersTo });
032:            }
033:
034:            public void wait(LockID lid, NodeID cid, ThreadID tid,
035:                    WaitInvocation waitInvocation, Sink lockResponseSink) {
036:                throw new ImplementMe();
037:            }
038:
039:            public static final class WaitCallContext {
040:                public final LockID lockID;
041:                public final NodeID nid;
042:                public final ThreadID threadID;
043:                public final WaitInvocation waitInvocation;
044:                public final Sink lockResponseSink;
045:
046:                private WaitCallContext(LockID lockID, NodeID cid,
047:                        ThreadID tid, int level, WaitInvocation waitInvocation,
048:                        Sink lockResponseSink) {
049:                    this .lockID = lockID;
050:                    this .nid = cid;
051:                    this .threadID = tid;
052:                    this .waitInvocation = waitInvocation;
053:                    this .lockResponseSink = lockResponseSink;
054:                }
055:            }
056:
057:            public boolean requestLock(LockID lockID, NodeID channelID,
058:                    ThreadID source, int level, Sink awardLockSink) {
059:                throw new ImplementMe();
060:            }
061:
062:            public void unlock(LockID id, NodeID receiverID, ThreadID threadID) {
063:                throw new ImplementMe();
064:            }
065:
066:            public boolean isLocked(LockID id) {
067:                throw new ImplementMe();
068:            }
069:
070:            public boolean hasPending(LockID id) {
071:                throw new ImplementMe();
072:            }
073:
074:            public void clearAllLocksFor(NodeID cid) {
075:                return;
076:            }
077:
078:            public Iterator getAllLocks() {
079:                throw new ImplementMe();
080:            }
081:
082:            public void scanForDeadlocks(DeadlockResults output) {
083:                throw new ImplementMe();
084:            }
085:
086:            public void start() {
087:                this .startCalls.add(new Object());
088:            }
089:
090:            public void stop() {
091:                throw new ImplementMe();
092:            }
093:
094:            public void waitTimeout(LockWaitContext context) {
095:                throw new ImplementMe();
096:            }
097:
098:            public void reestablishWait(LockID lid, NodeID cid, ThreadID tid,
099:                    int level, WaitInvocation waitInvocation,
100:                    Sink lockResponseSink) {
101:                reestablishWaitCalls.add(new WaitCallContext(lid, cid, tid,
102:                        level, waitInvocation, lockResponseSink));
103:            }
104:
105:            public void reestablishLock(LockID lid, NodeID cid, ThreadID tid,
106:                    int level, Sink lockResponseSink) {
107:                reestablishLockCalls
108:                        .add(new ReestablishLockContext(new LockContext(lid,
109:                                cid, tid, level), lockResponseSink));
110:            }
111:
112:            public static class ReestablishLockContext {
113:                public final LockContext lockContext;
114:                public final Sink lockResponseSink;
115:
116:                private ReestablishLockContext(LockContext lockContext,
117:                        Sink lockResponseSink) {
118:                    this .lockContext = lockContext;
119:                    this .lockResponseSink = lockResponseSink;
120:                }
121:            }
122:
123:            public void dump() {
124:                throw new ImplementMe();
125:            }
126:
127:            public void queryLock(LockID lockID, NodeID cid, ThreadID threadID,
128:                    Sink lockResponseSink) {
129:                throw new ImplementMe();
130:            }
131:
132:            public void interrupt(LockID lockID, NodeID cid, ThreadID threadID) {
133:                throw new ImplementMe();
134:            }
135:
136:            public boolean tryRequestLock(LockID lockID, NodeID channelID,
137:                    ThreadID threadID, int level, WaitInvocation timeout,
138:                    Sink awardLockSink) {
139:                throw new ImplementMe();
140:            }
141:
142:            public void recallCommit(LockID lid, NodeID cid,
143:                    Collection lockContexts, Collection waitContexts,
144:                    Collection pendingLockContexts,
145:                    Collection pendingTryLockContexts, Sink lockResponseSink) {
146:                throw new ImplementMe();
147:            }
148:
149:            public void disableClientStat(LockID lockID,
150:                    Set statEnabledClients, Sink sink) {
151:                throw new ImplementMe();
152:            }
153:
154:            public void enableClientStat(LockID lockID, Sink sink,
155:                    int lockStackTraceDepth, int lockStatCollectFrequency) {
156:                throw new ImplementMe();
157:            }
158:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.