// ids 4,5 used obj3
public PartialToyBuilder(long node) {
super(createPartialToyBuilderGraph(node));
if (node == NODE1) {
// Create a partial graph
Identity[] idents = {new DummyIdentity("1"),
new DummyIdentity("2")};
// Obj uses
Map<Identity, Long> tempMap =
new HashMap<Identity, Long>();
tempMap.put(idents[0], 2L);
tempMap.put(idents[1], 2L);
objUseMap.put("obj1", tempMap);
tempMap = new HashMap<Identity, Long>();
tempMap.put(idents[1], 1L);
objUseMap.put("obj2", tempMap);
// conflicts - data cache evictions due to conflict
HashMap<Object, Long> conflict = new HashMap<Object, Long>();
conflict.put("obj2", 1L);
conflictMap.put(NODE3, conflict);
} else if (node == NODE2) {
// Create a partial graph
Identity ident = new DummyIdentity("3");
// Obj uses
Map<Identity, Long> tempMap = new HashMap<Identity, Long>();
tempMap.put(ident, 1L);
objUseMap.put("obj1", tempMap);
// conflicts - data cache evictions due to conflict
HashMap<Object, Long> conflict = new HashMap<Object, Long>();
conflict.put("obj1", 1L);
conflictMap.put(NODE1, conflict);
} else if (node == NODE3) {
Identity[] idents = {new DummyIdentity("4"),
new DummyIdentity("5")};
// Obj uses
Map<Identity, Long> tempMap = new HashMap<Identity, Long>();
tempMap.put(idents[0], 1L);
tempMap.put(idents[1], 1L);