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.api;
06:
07: import com.tc.object.ObjectID;
08: import com.tc.objectserver.context.ObjectManagerResultsContext;
09:
10: import java.util.Collections;
11: import java.util.Map;
12: import java.util.Set;
13:
14: public class TestObjectManagerResultsContext implements
15: ObjectManagerResultsContext {
16:
17: private final Map results;
18: private final Set objectIDs;
19:
20: public TestObjectManagerResultsContext(Map results, Set objectIDs) {
21: this .results = results;
22: this .objectIDs = objectIDs;
23: }
24:
25: public Map getResults() {
26: return results;
27: }
28:
29: public void setResults(ObjectManagerLookupResults results) {
30: this .results.putAll(results.getObjects());
31: }
32:
33: public Set getLookupIDs() {
34: return objectIDs;
35: }
36:
37: public Set getNewObjectIDs() {
38: return Collections.EMPTY_SET;
39: }
40:
41: public void missingObject(ObjectID oid) {
42: throw new AssertionError("Missing Object : " + oid);
43: }
44:
45: }
|