KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > tx > ClientTransactionBatch


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.tx;
5
6 import com.tc.util.SequenceID;
7
8 import java.util.Collection JavaDoc;
9
10 /**
11  * Client representation of a batch of transactions. Has methods that are only useful in a client context.
12  */

13 public interface ClientTransactionBatch extends TransactionBatch {
14
15   public TxnBatchID getTransactionBatchID();
16
17   /**
18    * Adds the collection of transaction ids in this batch to the given collection and returns it.
19    */

20   public Collection JavaDoc addTransactionIDsTo(Collection JavaDoc c);
21
22   /**
23    * Add the given transaction to this batch.
24    */

25   public void addTransaction(ClientTransaction txn);
26
27   public void removeTransaction(TransactionID txID);
28
29   /**
30    * Send the transaction to the server.
31    */

32   public void send();
33
34   /**
35    * Adds the set of acknowledged GlobalTransactionIDs to the batch
36    */

37   public void addAcknowledgedTransactionIDs(Collection JavaDoc acknowledged);
38
39   public int numberOfTxns();
40
41   public int byteSize();
42
43   public boolean isNull();
44
45   public SequenceID getMinTransactionSequence();
46
47   public Collection JavaDoc addTransactionSequenceIDsTo(Collection JavaDoc sequenceIDs);
48
49   // For testing
50
public String JavaDoc dump();
51 }
52
Popular Tags