01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.objectserver.gtx;
06:
07: import com.tc.net.groups.NodeID;
08: import com.tc.object.gtx.GlobalTransactionID;
09: import com.tc.object.gtx.GlobalTransactionIDGenerator;
10: import com.tc.object.tx.ServerTransactionID;
11: import com.tc.objectserver.persistence.api.PersistenceTransaction;
12: import com.tc.util.sequence.Sequence;
13:
14: import java.util.Collection;
15: import java.util.Set;
16:
17: public interface ServerGlobalTransactionManager extends
18: GlobalTransactionIDGenerator {
19:
20: /**
21: * Changes state to APPLY_INITIATED and returns true if the specified transaction hasn't been initiated apply. If not
22: * returns false.
23: */
24: public boolean initiateApply(ServerTransactionID stxID);
25:
26: /**
27: * Commits the state of the transaciton.
28: */
29: public void commit(PersistenceTransaction persistenceTransaction,
30: ServerTransactionID stxID);
31:
32: /**
33: * Commits all the state of the all the transacitons.
34: */
35: public void commitAll(
36: PersistenceTransaction persistenceTransaction,
37: Collection gtxIDs);
38:
39: /**
40: * Notifies the transaction manager that the ServerTransactionIDs in the given collection are no longer active (i.e.,
41: * it will never be referenced again). The transaction manager is free to release resources dedicated those
42: * transactions.
43: */
44: public void clearCommitedTransactionsBelowLowWaterMark(
45: ServerTransactionID sid);
46:
47: /**
48: * This is used in the PASSIVE to clear completed transaction ids when low water mark is published from the ACTIVE.
49: */
50: public void clearCommitedTransactionsBelowLowWaterMark(
51: GlobalTransactionID lowGlobalTransactionIDWatermark);
52:
53: public void shutdownNode(NodeID nodeID);
54:
55: public void shutdownAllClientsExcept(Set cids);
56:
57: public GlobalTransactionID getGlobalTransactionID(
58: ServerTransactionID serverTransactionID);
59:
60: public void createGlobalTransactionDescIfNeeded(
61: ServerTransactionID stxnID,
62: GlobalTransactionID globalTransactionID);
63:
64: public GlobalTransactionIDSequenceProvider getGlobalTransactionIDSequenceProvider();
65:
66: public Sequence getGlobalTransactionIDSequence();
67:
68: }
|