/** * Method called by the using code to indicate it is done * with this instance. This lets instance merge accumulated * changes into parent (if need be), safely and efficiently, * and without calling code having to know about parent * information */ public void release() { // we will try to merge if child table has new entries if (_parent != null && maybeDirty()) { _parent.mergeChild(new TableInfo(this)); /* Let's also mark this instance as dirty, so that just in * case release was too early, there's no corruption of possibly shared data. */ _mainHashShared = true; _mainNamesShared = true; _collListShared = true; } }
private TableInfo initTableInfo(int hashSize) { return new TableInfo(0, // count hashSize - 1, // mainHashMask new int[hashSize], // mainHash new Name[hashSize], // mainNames null, // collList 0, // collCount, 0, // collEnd 0 // longestCollisionList ); }
/** * Method called by the using code to indicate it is done * with this instance. This lets instance merge accumulated * changes into parent (if need be), safely and efficiently, * and without calling code having to know about parent * information */ public void release() { // we will try to merge if child table has new entries if (_parent != null && maybeDirty()) { _parent.mergeChild(new TableInfo(this)); /* Let's also mark this instance as dirty, so that just in * case release was too early, there's no corruption of possibly shared data. */ _mainHashShared = true; _mainNamesShared = true; _collListShared = true; } }
private TableInfo initTableInfo(int hashSize) { return new TableInfo(0, // count hashSize - 1, // mainHashMask new int[hashSize], // mainHash new Name[hashSize], // mainNames null, // collList 0, // collCount, 0, // collEnd 0 // longestCollisionList ); }