1 package com.sleepycat.je.tree; 2 3 /* 4 * The state byte holds knownDeleted state in bit 0 and dirty state in bit 5 * 1. Bit flags are used here because of the desire to keep the child 6 * reference compact. State is persistent because knownDeleted is 7 * persistent, but the dirty bit is cleared when read in from the log. 8 * 9 * -- KnownDeleted is a way of indicating that the reference is invalid 10 * without logging new data. This happens in aborts and recoveries. If 11 * knownDeleted is true, this entry is surely deleted. If knownDeleted is 12 * false, this entry may or may not be deleted. Future space optimizations: 13 * store as a separate bit array in the BIN, or subclass ChildReference and 14 * make a special reference only used by BINs and not by INs. 15 * 16 * -- Dirty is true if the LSN or key has been changed since the last time 17 * the owning node was logged. This supports the calculation of BIN deltas. 18 */ 19 public class EntryStates { 20 21 /* 22 * Note that MIGRATE_BIT is no longer used but is reserved because it was 23 * accidentally set on logged INs in the past. 24 */ 25 static final byte KNOWN_DELETED_BIT = 0x1; 26 static final byte CLEAR_KNOWN_DELETED_BIT = ~0x1; 27 static final byte DIRTY_BIT = 0x2; 28 static final byte CLEAR_DIRTY_BIT = ~0x2; 29 static final byte MIGRATE_BIT = 0x4; // no longer used, see above 30 static final byte CLEAR_MIGRATE_BIT = ~0x4; 31 static final byte PENDING_DELETED_BIT = 0x8; 32 static final byte CLEAR_PENDING_DELETED_BIT = ~0x8; 33 } 34