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.context;
06:
07: import com.tc.async.api.EventContext;
08:
09: import java.util.Collection;
10: import java.util.Map;
11:
12: public class CommitTransactionContext implements EventContext {
13:
14: private Collection txnIDs;
15: private Collection objects;
16: private Map newRoots;
17: private boolean isInitialized = false;
18:
19: public CommitTransactionContext() {
20: // Empty constructor
21: }
22:
23: public void initialize(Collection appliedTxnIDs,
24: Collection appliedObjects, Map newRootsInAppliedTxns) {
25: this .txnIDs = appliedTxnIDs;
26: this .objects = appliedObjects;
27: this .newRoots = newRootsInAppliedTxns;
28: isInitialized = true;
29: }
30:
31: public boolean isInitialized() {
32: return isInitialized;
33: }
34:
35: public Collection getObjects() {
36: return objects;
37: }
38:
39: public Collection getAppliedServerTransactionIDs() {
40: return txnIDs;
41: }
42:
43: public Map getNewRoots() {
44: return newRoots;
45: }
46:
47: }
|