DbSpace (Oracle - Berkeley DB Java Edition API)
Date: 2014-12-16

com.sleepycat.je.util

## Class DbSpace

- java.lang.Object
- - com.sleepycat.je.util.DbSpace

-     public class DbSpace
      extends Object

  DbSpace displays the disk space utilization for an environment.

       usage: java { com.sleepycat.je.util.DbSpace |
                     -jar je-<version>.jar DbSpace }
                -h <dir># environment home directory
               [-q]     # quiet, print grand totals only
               [-u]     # sort by utilization
               [-d]     # dump file summary details
               [-r]     # recalculate utilization (expensive)
               [-s]     # start file number or LSN, in hex
               [-e]     # end file number or LSN, in hex
               [-V]     # print JE version number

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DbSpace(Environment env, boolean quiet, boolean details, boolean sorted)` Creates a DbSpace object for calculating utilization using an open Environment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(String[] argv)`
    `void` | `print(PrintStream out)` Calculates utilization and prints a report to the given output stream.
    `void` | `setEndFile(long endFile)` Sets the ending file number, which is an upper bound on the range of files for which utilization is reported and (optionally) recalculated.
    `void` | `setRecalculate(boolean recalc)` Sets the recalculation property, which if true causes a more expensive recalculation of utilization to be performed for debugging purposes.
    `void` | `setStartFile(long startFile)` Sets the start file number, which is a lower bound on the range of files for which utilization is reported and (optionally) recalculated.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DbSpace

          public DbSpace(Environment env,
                 boolean quiet,
                 boolean details,
                 boolean sorted)

      Creates a DbSpace object for calculating utilization using an open Environment.

  - ### Method Detail

    - #### main

          public static void main(String[] argv)
                           throws Exception

      Throws:
        `Exception`

    - #### setRecalculate

          public void setRecalculate(boolean recalc)

      Sets the recalculation property, which if true causes a more expensive recalculation of utilization to be performed for debugging purposes. This property is false by default.

    - #### setStartFile

          public void setStartFile(long startFile)

      Sets the start file number, which is a lower bound on the range of files for which utilization is reported and (optionally) recalculated. By default there is no lower bound.

    - #### setEndFile

          public void setEndFile(long endFile)

      Sets the ending file number, which is an upper bound on the range of files for which utilization is reported and (optionally) recalculated. By default there is no upper bound.

    - #### print

          public void print(PrintStream out)
                     throws DatabaseException

      Calculates utilization and prints a report to the given output stream.
      Throws:
        `DatabaseException`

Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.