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


001:        /*
002:         * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
003:         * notice. All rights reserved.
004:         */
005:        package com.tc.l2.objectserver;
006:
007:        import com.tc.net.groups.NodeID;
008:        import com.tc.object.dmi.DmiDescriptor;
009:        import com.tc.object.dna.impl.ObjectStringSerializer;
010:        import com.tc.object.gtx.GlobalTransactionID;
011:        import com.tc.object.lockmanager.api.LockID;
012:        import com.tc.object.tx.ServerTransactionID;
013:        import com.tc.object.tx.TransactionID;
014:        import com.tc.object.tx.TxnBatchID;
015:        import com.tc.object.tx.TxnType;
016:        import com.tc.objectserver.tx.ServerTransaction;
017:        import com.tc.util.Assert;
018:        import com.tc.util.SequenceID;
019:
020:        import java.util.Collection;
021:        import java.util.Collections;
022:        import java.util.List;
023:        import java.util.Map;
024:        import java.util.Set;
025:
026:        public class ObjectSyncServerTransaction implements  ServerTransaction {
027:
028:            private final TransactionID txnID;
029:            private final Set oids;
030:            private final List changes;
031:            private final ServerTransactionID serverTxnID;
032:            private final Map rootsMap;
033:            private final NodeID serverID;
034:
035:            public ObjectSyncServerTransaction(TransactionID txnID, Set oids,
036:                    int dnaCount, List changes, Map rootsMap, NodeID serverID) {
037:                this .txnID = txnID;
038:                this .oids = oids;
039:                this .changes = changes;
040:                this .rootsMap = rootsMap;
041:                this .serverID = serverID;
042:                this .serverTxnID = new ServerTransactionID(serverID, txnID);
043:                Assert.assertEquals(dnaCount, oids.size());
044:                Assert.assertEquals(dnaCount, changes.size());
045:            }
046:
047:            public Collection getNotifies() {
048:                return Collections.EMPTY_LIST;
049:            }
050:
051:            public TxnBatchID getBatchID() {
052:                return TxnBatchID.NULL_BATCH_ID;
053:            }
054:
055:            public List getChanges() {
056:                return changes;
057:            }
058:
059:            public NodeID getSourceID() {
060:                return serverID;
061:            }
062:
063:            public SequenceID getClientSequenceID() {
064:                throw new UnsupportedOperationException();
065:            }
066:
067:            public DmiDescriptor[] getDmiDescriptors() {
068:                throw new UnsupportedOperationException();
069:            }
070:
071:            public LockID[] getLockIDs() {
072:                return new LockID[0];
073:            }
074:
075:            public Map getNewRoots() {
076:                return rootsMap;
077:            }
078:
079:            public Set getObjectIDs() {
080:                return oids;
081:            }
082:
083:            /*
084:             * All objects contained in ObjectSync Message are new Objects for the passive
085:             */
086:            public Set getNewObjectIDs() {
087:                return oids;
088:            }
089:
090:            public ObjectStringSerializer getSerializer() {
091:                throw new UnsupportedOperationException();
092:            }
093:
094:            public ServerTransactionID getServerTransactionID() {
095:                return serverTxnID;
096:            }
097:
098:            public TransactionID getTransactionID() {
099:                return txnID;
100:            }
101:
102:            public TxnType getTransactionType() {
103:                return TxnType.NORMAL;
104:            }
105:
106:            // XXX:: this is server generated txn, hence GID is not assigned.
107:            public GlobalTransactionID getGlobalTransactionID() {
108:                return GlobalTransactionID.NULL_ID;
109:            }
110:
111:            public boolean needsBroadcast() {
112:                return false;
113:            }
114:
115:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.