KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > gtx > ServerGlobalTransactionManager


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.objectserver.gtx;
5
6 import com.tc.net.protocol.tcm.ChannelID;
7 import com.tc.object.gtx.GlobalTransactionID;
8 import com.tc.object.gtx.GlobalTransactionManager;
9 import com.tc.object.tx.ServerTransactionID;
10 import com.tc.objectserver.persistence.api.PersistenceTransaction;
11 import com.tc.objectserver.tx.ServerTransactionListener;
12
13 import java.util.Collection JavaDoc;
14
15 public interface ServerGlobalTransactionManager extends GlobalTransactionManager, ServerTransactionListener {
16
17   /**
18    * Returns true if the specified transaction hasn't been applied yet. This method is partially redundant with
19    * startApply. It should be removed once the dispatching logic is factored out of ProcessTransactionHandler and
20    * ApplyTransactionHandler
21    */

22   public boolean needsApply(ServerTransactionID stxID);
23
24   /**
25    * Commits the state of the transaciton.
26    */

27   public void commit(PersistenceTransaction persistenceTransaction, ServerTransactionID stxID);
28
29   /**
30    * Commits all the state of the all the transacitons.
31    */

32   public void commitAll(PersistenceTransaction persistenceTransaction, Collection JavaDoc gtxIDs);
33   
34   /**
35    * Notifies the transaction manager that the ServerTransactionIDs in the given collection are no longer active (i.e.,
36    * it will never be referenced again). The transaction manager is free to release resources dedicated those
37    * transactions.
38    */

39   public void completeTransactions(PersistenceTransaction tx, Collection JavaDoc collection);
40   
41   public void shutdownClient(ChannelID channelID);
42
43   public GlobalTransactionID createGlobalTransactionID(ServerTransactionID stxnID);
44
45 }
46
Popular Tags