BackupHandler (Oracle - Berkeley DB Java API)
Date: 2014-01-24

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB version 6.0.30
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.db
Interface BackupHandler

    public interface BackupHandler

An interface that can optionally be used to override the default behavior performed by the `Environment.backup` and `Environment.backupDatabase` methods. Implementation of this interface is required if the Environment.backup or Environment.backupDatabase target parameter is null.

You configure the environment with this handler using the `EnvironmentConfig.setBackupHandler` method.

Method Summary
`int` | `close(String dbname)` Called when ending a backup and closing a backup target.
`int` | `open(String target, String dbname)` Called when a target location is opened during a backup.
`int` | `write(long file_pos, byte[] buf, int off, int len)` Called when writing data during a backup.

Method Detail

### close

    int close(String dbname)

  Called when ending a backup and closing a backup target.

  Parameters:
    `dbname` - The name of the database that has been backed up.

### open

    int open(String target,
             String dbname)

  Called when a target location is opened during a backup. This method should do whatever is necessary to prepare the backup destination for writing the data.

  Parameters:
    `target` - The backup's directory destination.

    `dbname` - The name of the database being backed up.

### write

    int write(long file_pos,
              byte[] buf,
              int off,
              int len)

  Called when writing data during a backup.

  Parameters:
    `file_pos` - Identifies the position in the target file where the bytes from the buffer should be written.

    `buf` - Identifies the buffer which contains the data to be backed up.

    `off` - Specifies the start of the data in the buffer. This will always be zero.

    `len` - Identifies the number of bytes to back up from the buffer.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB version 6.0.30
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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