1 5 package com.tc.objectserver.tx; 6 7 import com.tc.async.impl.MockSink; 8 import com.tc.objectserver.context.ApplyCompleteEventContext; 9 import com.tc.objectserver.context.ApplyTransactionContext; 10 import com.tc.objectserver.context.CommitTransactionContext; 11 import com.tc.objectserver.context.LookupEventContext; 12 import com.tc.objectserver.context.RecallObjectsContext; 13 14 import java.util.Collections ; 15 16 public class TestTransactionalStageCoordinator implements TransactionalStageCoordinator { 17 18 public MockSink lookupSink = new MockSink(); 19 public MockSink recallSink = new MockSink(); 20 public MockSink applySink = new MockSink(); 21 public MockSink applyCompleteSink = new MockSink(); 22 public MockSink commitSink = new MockSink(); 23 24 public void addToApplyStage(ApplyTransactionContext context) { 25 applySink.add(context); 26 } 27 28 public void initiateApplyComplete() { 29 applyCompleteSink.add(new ApplyCompleteEventContext()); 30 } 31 32 public void initiateCommit() { 33 commitSink.add(new CommitTransactionContext()); 34 } 35 36 public void initiateLookup() { 37 lookupSink.addLossy(new LookupEventContext()); 38 } 39 40 public void initiateRecallAll() { 41 recallSink.add(new RecallObjectsContext(Collections.EMPTY_LIST, true)); 42 } 43 } | Popular Tags |