1 /*2 * See the file LICENSE for redistribution information.3 *4 * Copyright (c) 2002,2006 Oracle. All rights reserved.5 *6 * $Id: BINDeltaLogEntry.java,v 1.22 2006/10/30 21:14:21 bostic Exp $ 7 */8 9 package com.sleepycat.je.log.entry;10 11 import com.sleepycat.je.DatabaseException;12 import com.sleepycat.je.dbi.DatabaseId;13 import com.sleepycat.je.dbi.EnvironmentImpl;14 import com.sleepycat.je.tree.BINDelta;15 import com.sleepycat.je.tree.IN;16 17 /**18 * A BINDeltaLogEntry knows how to create a whole BIN from a delta entry.19 */20 public class BINDeltaLogEntry extends SingleItemLogEntry21 implements INContainingEntry {22 23 /**24 * @param logClass25 */26 public BINDeltaLogEntry(Class logClass) {27 super(logClass);28 }29 30 /* 31 * @see com.sleepycat.je.log.entry.INContainingEntry#getIN()32 */33 public IN getIN(EnvironmentImpl env) 34 throws DatabaseException {35 36 BINDelta delta = (BINDelta) getMainItem();37 return delta.reconstituteBIN(env);38 }39 40 /*41 * @see com.sleepycat.je.log.entry.INContainingEntry#getDbId()42 */43 public DatabaseId getDbId() {44 45 BINDelta delta = (BINDelta) getMainItem();46 return delta.getDbId(); 47 }48 49 /**50 * @return the LSN that represents this IN. For this BINDelta, it's51 * the last full version.52 */53 public long getLsnOfIN(long lastReadLsn) {54 55 BINDelta delta = (BINDelta) getMainItem();56 return delta.getLastFullLsn();57 }58 }59