1 4 package com.tc.objectserver.tx; 5 6 import com.tc.exception.ImplementMe; 7 import com.tc.net.protocol.tcm.ChannelID; 8 import com.tc.object.gtx.GlobalTransactionID; 9 import com.tc.object.tx.TransactionID; 10 import com.tc.object.tx.TxnBatchID; 11 import com.tc.objectserver.api.ObjectInstanceMonitor; 12 import com.tc.objectserver.managedobject.BackReferences; 13 import com.tc.objectserver.persistence.api.PersistenceTransaction; 14 import com.tc.util.concurrent.NoExceptionLinkedQueue; 15 16 import java.util.ArrayList ; 17 import java.util.Collection ; 18 import java.util.HashMap ; 19 import java.util.Map ; 20 import java.util.Set ; 21 22 public class TestServerTransactionManager implements ServerTransactionManager { 23 24 public Map txns = new HashMap (); 25 public final NoExceptionLinkedQueue skipCalls = new NoExceptionLinkedQueue(); 26 27 public TestServerTransactionManager() { 28 } 30 31 public final NoExceptionLinkedQueue shutdownClientCalls = new NoExceptionLinkedQueue(); 32 public final ArrayList incomingTxnContexts = new ArrayList (); 33 34 public void shutdownClient(ChannelID deadClient) { 35 shutdownClientCalls.put(deadClient); 36 } 37 38 public void addWaitingForAcknowledgement(ChannelID waiter, TransactionID requestID, ChannelID waitee) { 39 throw new ImplementMe(); 40 41 } 42 43 public boolean isWaiting(ChannelID waiter, TransactionID requestID) { 44 throw new ImplementMe(); 45 } 46 47 public void acknowledgement(ChannelID waiter, TransactionID requestID, ChannelID waitee) { 48 throw new ImplementMe(); 49 } 50 51 public void defineBatch(ChannelID channelID, TxnBatchID batchID, int count) { 52 throw new ImplementMe(); 53 } 54 55 public boolean startProgress(ChannelID channelID, TransactionID transactionID) { 56 throw new ImplementMe(); 57 } 58 59 public boolean needsApply(ChannelID channelID, TransactionID transactionID) { 60 throw new ImplementMe(); 61 } 62 63 public void completeTransactions(Collection collection) { 64 throw new ImplementMe(); 65 66 } 67 68 public void dump() { 69 throw new ImplementMe(); 70 } 71 72 public void apply(GlobalTransactionID gtxID, ServerTransaction txn, Map objects, BackReferences includeIDs) { 73 this.txns.put(txn, objects); 74 } 75 76 public void release(PersistenceTransaction ptx, Set objects, Map newRoots) { 77 throw new ImplementMe(); 78 } 79 80 public void committed(Set txnset) { 81 } 83 84 public void broadcasted(ChannelID waiter, TransactionID requestID) { 85 } 87 88 public void skipApplyAndCommit(ServerTransaction txn) { 89 skipCalls.put(txn); 90 } 91 92 public void setResentTransactionIDs(ChannelID channelID, Collection transactionIDs) { 93 } 95 96 public void addTransactionListener(ServerTransactionListener listener) { 97 } 99 100 public void apply(GlobalTransactionID gtxID, ServerTransaction txn, Map objects, BackReferences includeIDs, 101 ObjectInstanceMonitor instanceMonitor) { 102 } 104 105 public void committed(Collection tx) { 106 } 108 109 public void release(PersistenceTransaction ptx, Collection objects, Map newRoots) { 110 throw new ImplementMe(); 111 } 112 113 public void incomingTransactions(ChannelID channelID, Set serverTxnIDs, boolean relayed) { 114 incomingTxnContexts.add(new Object [] { channelID, serverTxnIDs, Boolean.valueOf(relayed) } ); 115 } 116 117 public void transactionsRelayed(ChannelID channelID, Set serverTxnIDs) { 118 throw new ImplementMe(); 119 } 120 121 } 122
| Popular Tags
|