1 8 9 package com.sleepycat.je.recovery.stepwise; 10 11 import java.util.HashSet ; 12 import java.util.Map ; 13 import java.util.Set ; 14 15 import com.sleepycat.bind.tuple.IntegerBinding; 16 import com.sleepycat.je.DatabaseEntry; 17 18 22 23 public class TxnalDeletedEntry extends LogEntryInfo { 24 private long txnId; 25 26 TxnalDeletedEntry(long lsn, 27 int key, 28 int data, 29 long txnId) { 30 super(lsn, key, data); 31 this.txnId = txnId; 32 } 33 34 39 public void updateExpectedSet(Set useExpected, 40 Map newUncommittedRecords, 41 Map deletedUncommittedRecords) { 42 DatabaseEntry keyEntry = new DatabaseEntry(); 43 DatabaseEntry dataEntry = new DatabaseEntry(); 44 45 IntegerBinding.intToEntry(key, keyEntry); 46 IntegerBinding.intToEntry(data, dataEntry); 47 48 Long mapKey = new Long (txnId); 49 Set records = (Set ) deletedUncommittedRecords.get(mapKey); 50 if (records == null) { 51 records = new HashSet (); 52 deletedUncommittedRecords.put(mapKey, records); 53 } 54 records.add(new TestData(keyEntry, dataEntry)); 55 } 56 } 57 | Popular Tags |