Beispiel #1
0
  /**
   * Mark this entry as deleted, using the delete flag. Only BINS may do this. Don't null the target
   * field.
   *
   * <p>This is used so that an LN can still be locked by the compressor even if the entry is
   * knownDeleted. See BIN.compress.
   *
   * @param index indicates target entry
   */
  public void setKnownDeletedLeaveTarget(int index) {

    /*
     * The migrate flag is cleared since migration is never needed for
     * known deleted entries.
     */
    setMigrate(index, false);
    super.setKnownDeleted(index);
    setDirty(true);
  }
Beispiel #2
0
  /**
   * Mark this entry as deleted, using the delete flag. Only BINS may do this.
   *
   * @param index indicates target entry
   */
  @Override
  public void setKnownDeleted(int index) {

    /*
     * The target is cleared to save memory, since a known deleted entry
     * will never be fetched.  The migrate flag is also cleared since
     * migration is never needed for known deleted entries either.
     */
    super.setKnownDeleted(index);

    /*
     * We know it's an LN because we never call setKnownDeleted for
     * an IN.
     */
    LN oldLN = (LN) getTarget(index);
    updateMemorySize(oldLN, null /* newNode */);
    if (oldLN != null) {
      oldLN.releaseMemoryBudget();
    }
    setMigrate(index, false);
    super.setTarget(index, null);
    setDirty(true);
  }