01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.objectserver.tx;
06:
07: import com.tc.net.groups.NodeID;
08: import com.tc.object.tx.TransactionID;
09:
10: import java.util.HashSet;
11: import java.util.Set;
12:
13: public interface TransactionAccount {
14:
15: public NodeID getNodeID();
16:
17: /*
18: * returns true if completed, false if not completed or if the client has sent a duplicate ACK.
19: */
20: public boolean removeWaitee(NodeID waitee, TransactionID requestID);
21:
22: public void addWaitee(NodeID waitee, TransactionID requestID);
23:
24: public boolean skipApplyAndCommit(TransactionID requestID);
25:
26: public boolean applyCommitted(TransactionID requestID);
27:
28: public boolean broadcastCompleted(TransactionID requestID);
29:
30: public boolean hasWaitees(TransactionID requestID);
31:
32: public Set requestersWaitingFor(NodeID nodeID);
33:
34: public boolean relayTransactionComplete(TransactionID requestID);
35:
36: public void incommingTransactions(Set serverTxnIDs);
37:
38: public void addAllPendingServerTransactionIDsTo(HashSet txnsInSystem);
39:
40: public void nodeDead(CallBackOnComplete callBack);
41:
42: public interface CallBackOnComplete {
43: public void onComplete(NodeID dead);
44: }
45:
46: }
|