Example #1
0
  MemoryBudget(EnvironmentImpl envImpl, DbConfigManager configManager) throws DatabaseException {

    this.envImpl = envImpl;

    /* Request notification of mutable property changes. */
    envImpl.addConfigObserver(this);

    /* Peform first time budget initialization. */
    reset(configManager);

    /*
     * Calculate IN and BIN overheads, which are a function of
     * capacity. These values are stored in this class so that they can be
     * calculated once per environment. The logic to do the calculations is
     * left in the respective node classes so it can be done properly in
     * the domain of those objects.
     */
    inOverhead = IN.computeOverhead(configManager);
    binOverhead = BIN.computeOverhead(configManager);
    dinOverhead = DIN.computeOverhead(configManager);
    dbinOverhead = DBIN.computeOverhead(configManager);
  }