public interface BackupHandler
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.
Modifier and Type | Method | Description |
---|---|---|
int |
close(java.lang.String dbname) |
Called when ending a backup and closing a backup target.
|
int |
open(java.lang.String target,
java.lang.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.
|
int close(java.lang.String dbname)
dbname
- The name of the database that has been backed up.int open(java.lang.String target, java.lang.String dbname)
target
- The backup's directory destination.
dbname
- The name of the database being backed up.int write(long file_pos, byte[] buf, int off, int len)
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.Copyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.