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.l2.context;
06:
07: import com.tc.async.api.EventContext;
08: import com.tc.net.groups.NodeID;
09: import com.tc.object.msg.CommitTransactionMessage;
10:
11: import java.util.Collection;
12: import java.util.Map;
13: import java.util.Set;
14:
15: public class IncomingTransactionContext implements EventContext {
16:
17: private final CommitTransactionMessage ctm;
18: private final Collection txns;
19: private final Set serverTxnIDs;
20: private final NodeID nodeID;
21:
22: public IncomingTransactionContext(NodeID nodeID,
23: CommitTransactionMessage ctm, Map txnsMap) {
24: this .nodeID = nodeID;
25: this .ctm = ctm;
26: this .txns = txnsMap.values();
27: this .serverTxnIDs = txnsMap.keySet();
28: }
29:
30: public CommitTransactionMessage getCommitTransactionMessage() {
31: return ctm;
32: }
33:
34: public Set getServerTransactionIDs() {
35: return serverTxnIDs;
36: }
37:
38: public Collection getTxns() {
39: return txns;
40: }
41:
42: public NodeID getNodeID() {
43: return nodeID;
44: }
45:
46: }
|