2
* See the file LICENSE for redistribution information.
4
* Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.
8
using System.Collections.Generic;
11
namespace BerkeleyDB {
13
/// A class representing configuration parameters for
14
/// <see cref="SecondaryQueueDatabase"/>
16
public class SecondaryQueueDatabaseConfig : SecondaryDatabaseConfig {
17
internal bool lengthIsSet;
20
/// Specify the length of records in the database.
24
/// The record length must be enough smaller than
25
/// <see cref="DatabaseConfig.PageSize"/> that at least one record plus
26
/// the database page's metadata information can fit on each database
30
/// Any records added to the database that are less than Length bytes
31
/// long are automatically padded (see <see cref="PadByte"/> for more
35
/// Any attempt to insert records into the database that are greater
36
/// than Length bytes long will cause the call to fail immediately and
40
/// If the database already exists, this setting will be ignored.
52
/// The policy for how to handle database creation.
55
/// If the database does not already exist and
56
/// <see cref="CreatePolicy.NEVER"/> is set,
57
/// <see cref="SecondaryQueueDatabase.Open"/> will fail.
59
public CreatePolicy Creation;
60
internal new uint openFlags {
62
uint flags = base.openFlags;
63
flags |= (uint)Creation;
69
internal bool padIsSet;
72
/// The padding character for short, fixed-length records.
76
/// If no pad character is specified, space characters (that is, ASCII
77
/// 0x20) are used for padding.
80
/// If the database already exists, this setting will be ignored.
91
internal bool extentIsSet;
92
private uint extentSz;
94
/// The size of the extents used to hold pages in a
95
/// <see cref="SecondaryQueueDatabase"/>, specified as a number of
100
/// Each extent is created as a separate physical file. If no extent
101
/// size is set, the default behavior is to create only a single
102
/// underlying database file.
105
/// For information on tuning the extent size, see Selecting a extent
106
/// size in the Programmer's Reference Guide.
109
/// If the database already exists, this setting will be ignored.
112
public uint ExtentSize {
113
get { return extentSz; }
121
/// Instantiate a new SecondaryQueueDatabaseConfig object
123
public SecondaryQueueDatabaseConfig(
124
Database PrimaryDB, SecondaryKeyGenDelegate KeyGenFunc)
125
: base(PrimaryDB, KeyGenFunc) {
129
DbType = DatabaseType.QUEUE;
b'\\ No newline at end of file'