Source Code Cross Referenced for TCObjectClone.java in  » Net » Terracotta » com » tc » object » tx » optimistic » 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.object.tx.optimistic 
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.object.tx.optimistic;
006:
007:        /**
008:         * In the clone objects we create for rollback we put one of these in the Managed field in order to be able to correlate
009:         * them with the original object they were created from.
010:         */
011:
012:        import com.tc.exception.ImplementMe;
013:        import com.tc.object.ObjectID;
014:        import com.tc.object.TCClass;
015:        import com.tc.object.TCObject;
016:        import com.tc.object.dna.api.DNA;
017:        import com.tc.object.dna.api.DNAException;
018:        import com.tc.object.dna.api.DNAWriter;
019:
020:        import gnu.trove.TLinkable;
021:
022:        public class TCObjectClone implements  TCObject {
023:            private final ObjectID objectID;
024:            private final long version;
025:            private final OptimisticTransactionManager txManager;
026:            private final TCClass tcClass;
027:            private final int arrayLength;
028:
029:            public TCObjectClone(TCObject source,
030:                    OptimisticTransactionManager txManager) {
031:                this (source, txManager, -1);
032:            }
033:
034:            public TCObjectClone(TCObject source,
035:                    OptimisticTransactionManager txManager, int arrayLength) {
036:                this .version = source.getVersion();
037:                this .objectID = source.getObjectID();
038:                this .txManager = txManager;
039:                this .tcClass = source.getTCClass();
040:                this .arrayLength = arrayLength;
041:            }
042:
043:            public void setNext(TLinkable link) {
044:                throw new ImplementMe();
045:            }
046:
047:            public void setPrevious(TLinkable link) {
048:                throw new ImplementMe();
049:            }
050:
051:            public TLinkable getNext() {
052:                throw new ImplementMe();
053:            }
054:
055:            public TLinkable getPrevious() {
056:                throw new ImplementMe();
057:            }
058:
059:            public ObjectID getObjectID() {
060:                return objectID;
061:            }
062:
063:            public Object getPeerObject() {
064:                throw new ImplementMe();
065:            }
066:
067:            public TCClass getTCClass() {
068:                return tcClass;
069:            }
070:
071:            public int clearReferences(int toClear) {
072:                throw new ImplementMe();
073:            }
074:
075:            public Object getResolveLock() {
076:                return this ;
077:            }
078:
079:            public void objectFieldChanged(String classname, String fieldname,
080:                    Object newValue, int index) {
081:                txManager.objectFieldChanged(this , classname, fieldname,
082:                        newValue, index);
083:            }
084:
085:            public void booleanFieldChanged(String classname, String fieldname,
086:                    boolean newValue, int index) {
087:                this .objectFieldChanged(classname, fieldname, new Boolean(
088:                        newValue), index);
089:            }
090:
091:            public void byteFieldChanged(String classname, String fieldname,
092:                    byte newValue, int index) {
093:                this .objectFieldChanged(classname, fieldname,
094:                        new Byte(newValue), index);
095:            }
096:
097:            public void charFieldChanged(String classname, String fieldname,
098:                    char newValue, int index) {
099:                this .objectFieldChanged(classname, fieldname, new Character(
100:                        newValue), index);
101:            }
102:
103:            public void doubleFieldChanged(String classname, String fieldname,
104:                    double newValue, int index) {
105:                this .objectFieldChanged(classname, fieldname, new Double(
106:                        newValue), index);
107:            }
108:
109:            public void floatFieldChanged(String classname, String fieldname,
110:                    float newValue, int index) {
111:                this .objectFieldChanged(classname, fieldname, new Float(
112:                        newValue), index);
113:            }
114:
115:            public void intFieldChanged(String classname, String fieldname,
116:                    int newValue, int index) {
117:                this .objectFieldChanged(classname, fieldname, new Integer(
118:                        newValue), index);
119:            }
120:
121:            public void longFieldChanged(String classname, String fieldname,
122:                    long newValue, int index) {
123:                this .objectFieldChanged(classname, fieldname,
124:                        new Long(newValue), index);
125:            }
126:
127:            public void shortFieldChanged(String classname, String fieldname,
128:                    short newValue, int index) {
129:                this .objectFieldChanged(classname, fieldname, new Short(
130:                        newValue), index);
131:            }
132:
133:            public void logicalInvoke(int method, String methodName,
134:                    Object[] parameters) {
135:                txManager.logicalInvoke(this , method, methodName, parameters);
136:            }
137:
138:            public void hydrate(DNA from, boolean force) throws DNAException {
139:                throw new ImplementMe();
140:            }
141:
142:            public void resolveReference(String fieldName) {
143:                // do nothing
144:            }
145:
146:            public void resolveArrayReference(int index) {
147:                // do Nothing
148:            }
149:
150:            public boolean isShared() {
151:                return false;
152:            }
153:
154:            public void resolveAllReferences() {
155:                // do nothing
156:            }
157:
158:            public ObjectID setReference(String fieldName, ObjectID id) {
159:                throw new ImplementMe();
160:            }
161:
162:            public void setArrayReference(int index, ObjectID id) {
163:                throw new ImplementMe();
164:            }
165:
166:            public void clearReference(String fieldName) {
167:                throw new ImplementMe();
168:
169:            }
170:
171:            public void setValue(String fieldName, Object obj) {
172:                throw new ImplementMe();
173:
174:            }
175:
176:            public long getVersion() {
177:                return version;
178:            }
179:
180:            public void setVersion(long version) {
181:                throw new ImplementMe();
182:            }
183:
184:            public boolean dehydrateIfNew(DNAWriter writer) throws DNAException {
185:                throw new ImplementMe();
186:            }
187:
188:            public void setIsNew() {
189:                throw new ImplementMe();
190:            }
191:
192:            public boolean isNew() {
193:                return false;
194:            }
195:
196:            public void markAccessed() {
197:                throw new ImplementMe();
198:            }
199:
200:            public void clearAccessed() {
201:                throw new ImplementMe();
202:            }
203:
204:            public boolean recentlyAccessed() {
205:                throw new ImplementMe();
206:            }
207:
208:            public void objectFieldChangedByOffset(String classname,
209:                    long fieldOffset, Object newValue, int index) {
210:                String fieldname = tcClass.getFieldNameByOffset(fieldOffset);
211:                objectFieldChanged(classname, fieldname, newValue, index);
212:            }
213:
214:            public String getFieldNameByOffset(long fieldOffset) {
215:                throw new ImplementMe();
216:            }
217:
218:            public void disableAutoLocking() {
219:                throw new ImplementMe();
220:            }
221:
222:            public boolean autoLockingDisabled() {
223:                return false;
224:            }
225:
226:            public boolean canEvict() {
227:                throw new ImplementMe();
228:            }
229:
230:            public void objectArrayChanged(int startPos, Object[] array,
231:                    int length) {
232:                throw new ImplementMe();
233:            }
234:
235:            public void primitiveArrayChanged(int startPos, Object arra,
236:                    int lengthy) {
237:                throw new ImplementMe();
238:            }
239:
240:            public int accessCount(int factor) {
241:                throw new ImplementMe();
242:            }
243:
244:            public void literalValueChanged(Object newValue, Object oldValue) {
245:                throw new ImplementMe();
246:            }
247:
248:            public void setLiteralValue(Object newValue) {
249:                throw new ImplementMe();
250:            }
251:
252:            public ArrayIndexOutOfBoundsException checkArrayIndex(int index) {
253:                if (arrayLength < 0) {
254:                    throw new AssertionError();
255:                }
256:                if (index < 0 || index >= arrayLength) {
257:                    return new ArrayIndexOutOfBoundsException(index);
258:                }
259:                return null;
260:            }
261:
262:            public boolean isFieldPortableByOffset(long fieldOffset) {
263:                throw new ImplementMe();
264:            }
265:
266:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.