Berkeley DB version 5.1.19

## com.sleepycat.db
Class VerifyConfig

    java.lang.Object
      com.sleepycat.db.VerifyConfig

    public class VerifyConfig

extends Object

Specifies the attributes of a verification operation.

Field Summary
`static VerifyConfig` `DEFAULT` Default configuration used if null is passed to `Database.verify`.

Constructor Summary
`VerifyConfig()` An instance created using the default constructor is initialized with the system's default settings.

Method Summary
`boolean` `getAggressive()` Return true if the `Database.verify` is configured to output all the key/data pairs in the file that can be found.
`boolean` `getNoOrderCheck()` Return true if the `Database.verify` is configured to skip the database checks for btree and duplicate sort order and for hashing.
`boolean` `getOrderCheckOnly()` Return true if the `Database.verify` is configured to do database checks for btree and duplicate sort order and for hashing, skipped by verification operations configured by `VerifyConfig.setNoOrderCheck`.
`boolean` `getPrintable()` Return true if the `Database.verify` is configured to use printing characters to where possible.
`boolean` `getSalvage()` Return true if the `Database.verify` is configured to write the key/data pairs from all databases in the file to the file stream named by the outfile parameter..
`void` `setAggressive(boolean aggressive)` Configure `Database.verify` to output all the key/data pairs in the file that can be found.
`void` `setNoOrderCheck(boolean noOrderCheck)` Configure `Database.verify` to skip the database checks for btree and duplicate sort order and for hashing.
`void` `setOrderCheckOnly(boolean orderCheckOnly)` Configure `Database.verify` to do database checks for btree and duplicate sort order and for hashing, skipped by verification operations configured by `VerifyConfig.setNoOrderCheck`.
`void` `setPrintable(boolean printable)` Configure `Database.verify` to use printing characters to where possible.
`void` `setSalvage(boolean salvage)` Configure `Database.verify` to write the key/data pairs from all databases in the file to the file stream named by the outfile parameter.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT

    public static final VerifyConfig DEFAULT

  Default configuration used if null is passed to `Database.verify`.

Constructor Detail

### VerifyConfig

    public VerifyConfig()

  An instance created using the default constructor is initialized with the system's default settings.

Method Detail

### setAggressive

    public void setAggressive(boolean aggressive)

  Configure `Database.verify` to output all the key/data pairs in the file that can be found.

  By default, `Database.verify` does not assume corruption. For example, if a key/data pair on a page is marked as deleted, it is not then written to the output file. When `Database.verify` is configured with this method, corruption is assumed, and any key/data pair that can be found is written. In this case, key/data pairs that are corrupted or have been deleted may appear in the output (even if the file being salvaged is in no way corrupt), and the output will almost certainly require editing before being loaded into a database.

  Parameters:
    `aggressive` - If true, configure `Database.verify` to output all the key/data pairs in the file that can be found.

### getAggressive

    public boolean getAggressive()

  Return true if the `Database.verify` is configured to output all the key/data pairs in the file that can be found.

  This method may be called at any time during the life of the application.

  Returns:
    True if the `Database.verify` is configured to output all the key/data pairs in the file that can be found.

### setNoOrderCheck

    public void setNoOrderCheck(boolean noOrderCheck)

  Configure `Database.verify` to skip the database checks for btree and duplicate sort order and for hashing.

  `Database.verify` normally verifies that btree keys and duplicate items are correctly sorted, and hash keys are correctly hashed. If the file being verified contains multiple databases using differing sorting or hashing algorithms, some of them must necessarily fail database verification because only one sort order or hash function can be specified before `Database.verify` is called. To verify files with multiple databases having differing sorting orders or hashing functions, first perform verification of the file as a whole using `Database.verify` configured with `VerifyConfig.setNoOrderCheck`, and then individually verify the sort order and hashing function for each database in the file using 4_link(Database, verify) configured with `VerifyConfig.setOrderCheckOnly`.

  Parameters:
    `noOrderCheck` - If true, configure `Database.verify` to skip the database checks for btree and duplicate sort order and for hashing.

### getNoOrderCheck

    public boolean getNoOrderCheck()

  Return true if the `Database.verify` is configured to skip the database checks for btree and duplicate sort order and for hashing.

  This method may be called at any time during the life of the application.

  Returns:
    True if the `Database.verify` is configured to skip the database checks for btree and duplicate sort order and for hashing.

### setOrderCheckOnly

    public void setOrderCheckOnly(boolean orderCheckOnly)

  Configure `Database.verify` to do database checks for btree and duplicate sort order and for hashing, skipped by verification operations configured by `VerifyConfig.setNoOrderCheck`.

  When this flag is specified, a database name must be specified to `Database.verify`, indicating the database in the physical file which is to be checked.

  This configuration is only safe to use on databases that have already successfully been verified with `VerifyConfig.setNoOrderCheck` configured.

  Parameters:
    `orderCheckOnly` - If true, configure `Database.verify` to do database checks for btree and duplicate sort order and for hashing, skipped by verification operations configured by `VerifyConfig.setNoOrderCheck`.

### getOrderCheckOnly

    public boolean getOrderCheckOnly()

  Return true if the `Database.verify` is configured to do database checks for btree and duplicate sort order and for hashing, skipped by verification operations configured by `VerifyConfig.setNoOrderCheck`.

  This method may be called at any time during the life of the application.

  Returns:
    True if the `Database.verify` is configured to do database checks for btree and duplicate sort order and for hashing, skipped by verification operations configured by `VerifyConfig.setNoOrderCheck`.

### setPrintable

    public void setPrintable(boolean printable)

  Configure `Database.verify` to use printing characters to where possible.

  This method is only meaningful when combined with `VerifyConfig.setSalvage`.

  This configuration permits users to use standard text editors and tools to modify the contents of databases or selectively remove data from salvager output.

  Note: different systems may have different notions about what characters are considered printing characters, and databases dumped in this manner may be less portable to external systems.

  Parameters:
    `printable` - If true, configure `Database.verify` to use printing characters to where possible.

### getPrintable

    public boolean getPrintable()

  Return true if the `Database.verify` is configured to use printing characters to where possible.

  This method may be called at any time during the life of the application.

  Returns:
    True if the `Database.verify` is configured to use printing characters to where possible.

### setSalvage

    public void setSalvage(boolean salvage)

  Configure `Database.verify` to write the key/data pairs from all databases in the file to the file stream named by the outfile parameter.

  The output format is the same as that specified for the db_dump utility, and can be used as input for the db_load utility.

  Because the key/data pairs are output in page order as opposed to the sort order used by db_dump, using `Database.verify` to dump key/data pairs normally produces less than optimal loads for Btree databases.

  Parameters:
    `salvage` - If true, configure `Database.verify` to write the key/data pairs from all databases in the file to the file stream named by the outfile parameter.

### getSalvage

    public boolean getSalvage()

  Return true if the `Database.verify` is configured to write the key/data pairs from all databases in the file to the file stream named by the outfile parameter..

  This method may be called at any time during the life of the application.

  Returns:
    True if the `Database.verify` is configured to write the key/data pairs from all databases in the file to the file stream named by the outfile parameter..

Berkeley DB version 5.1.19

Copyright (c) 1996, 2010 Oracle and/or its affiliates. All rights reserved.