001: /*
002: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
003: */
004: package com.tc.object.tx;
005:
006: import com.tc.exception.ImplementMe;
007: import com.tc.object.lockmanager.api.LockFlushCallback;
008: import com.tc.object.lockmanager.api.LockID;
009: import com.tc.object.session.SessionID;
010: import com.tc.util.concurrent.NoExceptionLinkedQueue;
011:
012: import java.util.Collection;
013: import java.util.Map;
014:
015: /**
016: * @author steve
017: */
018: public class TestRemoteTransactionManager implements
019: RemoteTransactionManager {
020: // public final NoExceptionLinkedQueue resendOutstandingContexts = new NoExceptionLinkedQueue();
021: // public final NoExceptionLinkedQueue pauseCalls = new NoExceptionLinkedQueue();
022: // public final NoExceptionLinkedQueue unpauseCalls = new NoExceptionLinkedQueue();
023: public final NoExceptionLinkedQueue isChangeListenerCalls = new NoExceptionLinkedQueue();
024:
025: public LockID[] ids;
026: public Map changes;
027: public TransactionID txID;
028: public Map newRoots;
029: public TransactionID acked;
030: public TxnType transactionType;
031: public TxnBatchID batchAcked;
032: public ClientTransaction transaction;
033:
034: public void commit(ClientTransaction txn) {
035: this .ids = txn.getAllLockIDs();
036: this .changes = txn.getChangeBuffers();
037: this .txID = txn.getTransactionID();
038: this .newRoots = txn.getNewRoots();
039: this .transactionType = txn.getTransactionType();
040: this .transaction = txn;
041: }
042:
043: public void receivedAcknowledgement(SessionID sessionID,
044: TransactionID ackTxID) {
045: this .acked = ackTxID;
046: }
047:
048: public void receivedBatchAcknowledgement(TxnBatchID batchID) {
049: this .batchAcked = batchID;
050: }
051:
052: public int getPendingBatchSize() {
053: throw new ImplementMe();
054: }
055:
056: public void resendOutstanding() {
057: //this.resendOutstandingContexts.put(new Object());
058: throw new ImplementMe();
059: }
060:
061: public void pause() {
062: //this.pauseCalls.put(new Object());
063: throw new ImplementMe();
064: }
065:
066: public void unpause() {
067: //this.pauseCalls.put(new Object());
068: throw new ImplementMe();
069: }
070:
071: public void flush(LockID lockID) {
072: throw new ImplementMe();
073: }
074:
075: public Collection getTransactionSequenceIDs() {
076: throw new ImplementMe();
077: }
078:
079: public void stop() {
080: throw new ImplementMe();
081:
082: }
083:
084: public void starting() {
085: throw new ImplementMe();
086:
087: }
088:
089: public Collection getResentTransactionIDs() {
090: throw new ImplementMe();
091: }
092:
093: public void resendOutstandingAndUnpause() {
094: throw new ImplementMe();
095: }
096:
097: public boolean isTransactionsForLockFlushed(LockID lockID,
098: LockFlushCallback callback) {
099: throw new ImplementMe();
100: }
101:
102: public void stopProcessing() {
103: throw new ImplementMe();
104: }
105: }
|