1 8 9 package com.sleepycat.je.recovery.stepwise; 10 11 import java.util.Iterator ; 12 import java.util.Map ; 13 import java.util.Set ; 14 15 24 25 public class CommitEntry extends LogEntryInfo { 26 private long txnId; 27 28 CommitEntry(long lsn, long txnId) { 29 super(lsn, 0, 0); 30 this.txnId = txnId; 31 } 32 33 public void updateExpectedSet(Set useExpected, 34 Map newUncommittedRecords, 35 Map deletedUncommittedRecords) { 36 37 Long mapKey = new Long (txnId); 38 39 40 Set records = (Set ) newUncommittedRecords.get(mapKey); 41 if (records != null) { 42 Iterator iter = records.iterator(); 43 while (iter.hasNext()) { 44 useExpected.add((TestData) iter.next()); 45 } 46 } 47 48 49 records = (Set ) deletedUncommittedRecords.get(mapKey); 50 if (records != null) { 51 Iterator iter = records.iterator(); 52 while (iter.hasNext()) { 53 useExpected.remove((TestData) iter.next()); 54 } 55 } 56 } 57 } 58 | Popular Tags |