1 5 package com.tc.objectserver.tx; 6 7 import com.tc.l2.msg.RelayedCommitTransactionMessage; 8 import com.tc.object.msg.CommitTransactionMessage; 9 10 import java.io.IOException ; 11 import java.util.Collections ; 12 import java.util.HashSet ; 13 14 public final class CommitTransactionMessageToTransactionBatchReader implements TransactionBatchReaderFactory { 15 16 public TransactionBatchReader newTransactionBatchReader(CommitTransactionMessage ctm) throws IOException { 18 return new TransactionBatchReaderImpl(ctm.getBatchData(), ctm.getChannelID(), ctm 19 .addAcknowledgedTransactionIDsTo(new HashSet ()), ctm.getSerializer(), false); 20 } 21 22 public TransactionBatchReader newTransactionBatchReader(RelayedCommitTransactionMessage ctm) throws IOException { 24 return new TransactionBatchReaderImpl(ctm.getBatchData(), ctm.getChannelID(), Collections.EMPTY_LIST, ctm 25 .getSerializer(), true); 26 } 27 28 } | Popular Tags |