Top Description Fields Methods
org.apache.derby.database

public Interface Database

Known Direct Subinterfaces
org.apache.derby.iapi.db.Database
Imports
org.apache.derby.catalog.UUID, java.sql.Timestamp, .SQLException, java.util.Locale, java.io.File

The Database interface provides control over a database (that is, the stored data and the files the data are stored in), operations on the database such as backup and recovery, and all other things that are associated with the database itself.
See Also
org.apache.derby.iapi.db.Factory

Field Summary

Modifier and TypeField and Description
public static final String

Method Summary

Modifier and TypeMethod and Description
public void
backup(String
the directory name where the database backup should go. This directory will be created if not it does not exist.
backupDir
,
boolean
if true, waits for all the backup blocking operations in progress to finish.
wait
)

Backup the database to a backup directory.

public void
backupAndEnableLogArchiveMode(String
The directory name where the database backup should go. This directory will be created if it does not exist.
backupDir
,
boolean
If true deletes online archived log files that exist before this backup; otherwise they will not be deleted. Deletion will occur only after backup is complete.
deleteOnlineArchivedLogFiles
,
boolean
if true, waits for all the backup blocking operations in progress to finish.
wait
)

Backup the database to a backup directory and enable the log archive mode that will keep the archived log files required for roll-forward from this version backup.

public void
checkpoint()

Checkpoints the database, that is, flushes all dirty data to disk.

public void
disableLogArchiveMode(boolean
If true deletes all online archived log files that exist before this call immediately; otherwise they will not be deleted.
deleteOnlineArchivedLogFiles
)

Disables the log archival process, i.e No old log files will be kept around for a roll-forward recovery.

public void
freeze()

Freeze the database temporarily so a backup can be taken.

public UUID

Returns:

the UUID of this database.
getId
()
Deprecated No longer supported.

Return the UUID of this database.

public Locale

Returns:

the Locale for this database.
getLocale
()

Get the Locale for this database.

public boolean

Returns:

TRUE means the Database is read-only, FALSE means it is not read-only.
isReadOnly
()

Tells whether the Database is configured as read-only, or the Database was started in read-only mode.

public void
unfreeze()

Unfreeze the database after a backup has been taken.

Field Detail

LUCENE_DIRback to summary
public static final String LUCENE_DIR

Method Detail

backupback to summary
public void backup(String backupDir, boolean wait) throws SQLException

Backup the database to a backup directory. See online documentation for more detail about how to use this feature.

Parameters
backupDir:String

the directory name where the database backup should go. This directory will be created if not it does not exist.

wait:boolean

if true, waits for all the backup blocking operations in progress to finish.

Exceptions
SQLException:
Thrown on error
backupAndEnableLogArchiveModeback to summary
public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait) throws SQLException

Backup the database to a backup directory and enable the log archive mode that will keep the archived log files required for roll-forward from this version backup.

Parameters
backupDir:String

The directory name where the database backup should go. This directory will be created if it does not exist.

deleteOnlineArchivedLogFiles:boolean

If true deletes online archived log files that exist before this backup; otherwise they will not be deleted. Deletion will occur only after backup is complete.

wait:boolean

if true, waits for all the backup blocking operations in progress to finish.

Exceptions
SQLException:
Thrown on error
checkpointback to summary
public void checkpoint() throws SQLException

Checkpoints the database, that is, flushes all dirty data to disk. Records a checkpoint in the transaction log, if there is a log.

Exceptions
SQLException:
Thrown on error
disableLogArchiveModeback to summary
public void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles) throws SQLException

Disables the log archival process, i.e No old log files will be kept around for a roll-forward recovery. Only restore that can be performed after disabling log archive mode is version recovery.

Parameters
deleteOnlineArchivedLogFiles:boolean

If true deletes all online archived log files that exist before this call immediately; otherwise they will not be deleted.

Exceptions
SQLException:
Thrown on error
freezeback to summary
public void freeze() throws SQLException

Freeze the database temporarily so a backup can be taken.

Please see the Derby documentation on backup and restore.

Exceptions
SQLException:
Thrown on error
getIdback to summary
public UUID getId()

Deprecated

No longer supported.

Return the UUID of this database.

Returns:UUID

the UUID of this database.

getLocaleback to summary
public Locale getLocale()

Get the Locale for this database.

Returns:Locale

the Locale for this database.

isReadOnlyback to summary
public boolean isReadOnly()

Tells whether the Database is configured as read-only, or the Database was started in read-only mode.

Returns:boolean

TRUE means the Database is read-only, FALSE means it is not read-only.

unfreezeback to summary
public void unfreeze() throws SQLException

Unfreeze the database after a backup has been taken.

Please see the Derby documentation on backup and restore.

Exceptions
SQLException:
Thrown on error