/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2009 Oracle. All rights reserved.
*
*/
using BerkeleyDB.Internal;
namespace BerkeleyDB {
///
/// The policy for how to handle database creation.
///
public enum CreatePolicy : uint {
///
/// Never create the database.
///
NEVER = 0,
///
/// Create the database if it does not already exist.
///
IF_NEEDED = DbConstants.DB_CREATE,
///
/// Do not open the database and return an error if it already exists.
///
ALWAYS = DbConstants.DB_CREATE | DbConstants.DB_EXCL
};
///
/// Specifies the database operation whose progress is being reported
///
public enum DatabaseFeedbackEvent : uint {
///
/// The underlying database is being upgraded.
///
UPGRADE = DbConstants.DB_UPGRADE,
///
/// The underlying database is being verified.
///
VERIFY = DbConstants.DB_VERIFY
};
///
/// Policy for duplicate data items in the database; that is, whether insertion
/// when the key of the key/data pair being inserted already exists in the
/// database will be successful.
///
public enum DuplicatesPolicy : uint {
///
/// Insertion when the key of the key/data pair being inserted already
/// exists in the database will fail.
///
NONE = 0,
///
/// Duplicates are allowed and mainted in sorted order, as determined by the
/// duplicate comparison function.
///
SORTED = DbConstants.DB_DUPSORT,
///
/// Duplicates are allowed and ordered in the database by the order of
/// insertion, unless the ordering is otherwise specified by use of a cursor
/// operation or a duplicate sort function.
///
UNSORTED = DbConstants.DB_DUP
};
///
/// Specifies an algorithm used for encryption and decryption
///
public enum EncryptionAlgorithm : uint {
///
/// The default algorithm, or the algorithm previously used in an
/// existing environment
///
DEFAULT = 0,
///
/// The Rijndael/AES algorithm
///
///
/// Also known as the Advanced Encryption Standard and Federal
/// Information Processing Standard (FIPS) 197
///
AES = DbConstants.DB_ENCRYPT_AES
};
///
/// Specifies the environment operation whose progress is being reported
///
public enum EnvironmentFeedbackEvent : uint {
///
/// The environment is being recovered.
///
RECOVERY = DbConstants.DB_RECOVER,
};
///
/// Specifies the action to take when deleting a foreign key
///
public enum ForeignKeyDeleteAction : uint {
///
/// Abort the deletion.
///
ABORT = DbConstants.DB_FOREIGN_ABORT,
///
/// Delete records that refer to the foreign key
///
CASCADE = DbConstants.DB_FOREIGN_CASCADE,
///
/// Nullify records that refer to the foreign key
///
NULLIFY = DbConstants.DB_FOREIGN_NULLIFY
};
///
/// Specify the degree of isolation for transactional operations
///
public enum Isolation {
///
/// Read operations on the database may request the return of modified
/// but not yet committed data.
///
DEGREE_ONE,
///
/// Provide for cursor stability but not repeatable reads. Data items
/// which have been previously read by a transaction may be deleted or
/// modified by other transactions before the original transaction
/// completes.
///
DEGREE_TWO,
///
/// For the life of the transaction, every time a thread of control
/// reads a data item, it will be unchanged from its previous value
/// (assuming, of course, the thread of control does not itself modify
/// the item). This is Berkeley DB's default degree of isolation.
///
DEGREE_THREE
};
///
/// Specify a Berkeley DB event
///
public enum NotificationEvent : uint {
///
/// The database environment has failed.
///
///
/// All threads of control in the database environment should exit the
/// environment, and recovery should be run.
///
PANIC = DbConstants.DB_EVENT_PANIC,
///
/// The local site is now a replication client.
///
REP_CLIENT = DbConstants.DB_EVENT_REP_CLIENT,
///
/// The local replication site has just won an election.
///
///
///
/// An application using the Base replication API should arrange for a
/// call to
/// after
/// receiving this event, to reconfigure the local environment as a
/// replication master.
///
///
/// Replication Manager applications may safely ignore this event. The
/// Replication Manager calls
///
/// automatically on behalf of the application when appropriate
/// (resulting in firing of the event).
///
///
REP_ELECTED = DbConstants.DB_EVENT_REP_ELECTED,
///
/// The local site is now the master site of its replication group. It
/// is the application's responsibility to begin acting as the master
/// environment.
///
REP_MASTER = DbConstants.DB_EVENT_REP_MASTER,
///
/// The replication group of which this site is a member has just
/// established a new master; the local site is not the new master. The
/// event_info parameter to the
/// stores an integer containing the environment ID of the new master.
///
REP_NEWMASTER = DbConstants.DB_EVENT_REP_NEWMASTER,
///
/// The replication manager did not receive enough acknowledgements
/// (based on the acknowledgement policy configured with
/// ) to ensure a
/// transaction's durability within the replication group. The
/// transaction will be flushed to the master's local disk storage for
/// durability.
///
///
/// This event is provided only to applications configured for the
/// replication manager.
///
REP_PERM_FAILED = DbConstants.DB_EVENT_REP_PERM_FAILED,
///
/// The client has completed startup synchronization and is now
/// processing live log records received from the master.
///
REP_STARTUPDONE = DbConstants.DB_EVENT_REP_STARTUPDONE,
///
/// A Berkeley DB write to stable storage failed.
///
WRITE_FAILED = DbConstants.DB_EVENT_WRITE_FAILED
};
}