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;
006:
007: import com.tc.exception.ImplementMe;
008: import com.tc.management.beans.tx.ClientTxMonitorMBean;
009: import com.tc.object.ObjectID;
010: import com.tc.object.TCObject;
011: import com.tc.object.dmi.DmiDescriptor;
012: import com.tc.object.lockmanager.api.LockID;
013: import com.tc.object.lockmanager.api.Notify;
014: import com.tc.util.SequenceID;
015:
016: import java.util.Collection;
017: import java.util.Collections;
018: import java.util.HashMap;
019: import java.util.HashSet;
020: import java.util.List;
021: import java.util.Map;
022:
023: public class TestClientTransaction implements ClientTransaction {
024:
025: public TransactionID txID;
026: public LockID lockID;
027: public TxnType txnType;
028: private boolean hasChangesOrNotifies = true;
029: public Collection allLockIDs = new HashSet();
030: public SequenceID sequenceID;
031: public Map newRoots = new HashMap();
032: public Map changeBuffers = new HashMap();
033:
034: public TestClientTransaction() {
035: super ();
036: }
037:
038: public Map getChangeBuffers() {
039: return changeBuffers;
040: }
041:
042: public Map getNewRoots() {
043: return newRoots;
044: }
045:
046: public LockID getLockID() {
047: return lockID;
048: }
049:
050: public LockID[] getAllLockIDs() {
051: return (LockID[]) allLockIDs.toArray(new LockID[allLockIDs
052: .size()]);
053: }
054:
055: public TransactionID getTransactionID() {
056: return txID;
057: }
058:
059: public void createObject(TCObject source) {
060: throw new ImplementMe();
061: }
062:
063: public void createRoot(String name, ObjectID rootID) {
064: throw new ImplementMe();
065: }
066:
067: public void fieldChanged(TCObject source, String classname,
068: String fieldname, Object newValue, int index) {
069: throw new ImplementMe();
070: }
071:
072: public void logicalInvoke(TCObject source, int method,
073: Object[] parameters, String methodName) {
074: throw new ImplementMe();
075: }
076:
077: public boolean hasChangesOrNotifies() {
078: return this .hasChangesOrNotifies;
079: }
080:
081: public boolean isNull() {
082: throw new ImplementMe();
083: }
084:
085: public TxnType getTransactionType() {
086: return txnType;
087: }
088:
089: public void addNotify(Notify notify) {
090: throw new ImplementMe();
091: }
092:
093: public List addNotifiesTo(List notifies) {
094: return notifies;
095: }
096:
097: public void setSequenceID(SequenceID sequenceID) {
098: return;
099: }
100:
101: public SequenceID getSequenceID() {
102: return this .sequenceID;
103: }
104:
105: public boolean isConcurrent() {
106: return false;
107: }
108:
109: public void setTransactionContext(
110: TransactionContext transactionContext) {
111: throw new ImplementMe();
112: }
113:
114: public void setAlreadyCommitted() {
115: throw new ImplementMe();
116: }
117:
118: public boolean hasChanges() {
119: throw new ImplementMe();
120: }
121:
122: public int getNotifiesCount() {
123: throw new ImplementMe();
124: }
125:
126: public void arrayChanged(TCObject source, int startPos,
127: Object array, int length) {
128: throw new ImplementMe();
129: }
130:
131: public void updateMBean(ClientTxMonitorMBean txMBean) {
132: throw new ImplementMe();
133: }
134:
135: public void literalValueChanged(TCObject source, Object newValue,
136: Object oldValue) {
137: throw new ImplementMe();
138: }
139:
140: public Collection getReferencesOfObjectsInTxn() {
141: return Collections.EMPTY_LIST;
142: }
143:
144: public void addDmiDescritor(DmiDescriptor dd) {
145: throw new ImplementMe();
146: }
147:
148: public List getDmiDescriptors() {
149: return Collections.EMPTY_LIST;
150: }
151:
152: public boolean hasDmiDescriptors() {
153: throw new ImplementMe();
154: }
155:
156: }
|