summaryrefslogtreecommitdiff
path: root/lang/csharp/src
diff options
context:
space:
mode:
Diffstat (limited to 'lang/csharp/src')
-rw-r--r--lang/csharp/src/AckPolicy.cs6
-rw-r--r--lang/csharp/src/ActiveTransaction.cs8
-rw-r--r--lang/csharp/src/BTreeCursor.cs34
-rw-r--r--lang/csharp/src/BTreeDatabase.cs181
-rw-r--r--lang/csharp/src/BTreeDatabaseConfig.cs141
-rw-r--r--lang/csharp/src/BTreeStats.cs6
-rw-r--r--lang/csharp/src/BackupOptions.cs17
-rw-r--r--lang/csharp/src/BaseCursor.cs12
-rw-r--r--lang/csharp/src/BaseDatabase.cs211
-rw-r--r--lang/csharp/src/ByteOrder.cs2
-rw-r--r--lang/csharp/src/CacheInfo.cs2
-rw-r--r--lang/csharp/src/CachePriority.cs2
-rw-r--r--lang/csharp/src/CompactConfig.cs24
-rw-r--r--lang/csharp/src/CompactData.cs4
-rw-r--r--lang/csharp/src/Cursor.cs210
-rw-r--r--lang/csharp/src/CursorConfig.cs16
-rw-r--r--lang/csharp/src/Database.cs92
-rw-r--r--lang/csharp/src/DatabaseConfig.cs73
-rw-r--r--lang/csharp/src/DatabaseEntry.cs24
-rw-r--r--lang/csharp/src/DatabaseEnvironment.cs835
-rw-r--r--lang/csharp/src/DatabaseEnvironmentConfig.cs182
-rw-r--r--lang/csharp/src/DatabaseException.cs29
-rw-r--r--lang/csharp/src/DatabaseStream.cs146
-rw-r--r--lang/csharp/src/DatabaseStreamConfig.cs58
-rw-r--r--lang/csharp/src/DatabaseType.cs2
-rw-r--r--lang/csharp/src/DbChannel.cs8
-rw-r--r--lang/csharp/src/DbSite.cs12
-rw-r--r--lang/csharp/src/DbSiteConfig.cs4
-rw-r--r--lang/csharp/src/DbThreadID.cs2
-rw-r--r--lang/csharp/src/DeadlockPolicy.cs2
-rw-r--r--lang/csharp/src/Delegates.cs37
-rw-r--r--lang/csharp/src/Enums.cs33
-rw-r--r--lang/csharp/src/ErrorCodes.cs14
-rw-r--r--lang/csharp/src/HashCursor.cs36
-rw-r--r--lang/csharp/src/HashDatabase.cs174
-rw-r--r--lang/csharp/src/HashDatabaseConfig.cs131
-rw-r--r--lang/csharp/src/HashStats.cs12
-rw-r--r--lang/csharp/src/HeapDatabase.cs68
-rw-r--r--lang/csharp/src/HeapDatabaseConfig.cs74
-rw-r--r--lang/csharp/src/HeapRecordId.cs2
-rw-r--r--lang/csharp/src/HeapStats.cs6
-rw-r--r--lang/csharp/src/IBackup.cs2
-rw-r--r--lang/csharp/src/Internal/DB.cs100
-rw-r--r--lang/csharp/src/Internal/DBC.cs14
-rw-r--r--lang/csharp/src/Internal/DBT.cs2
-rw-r--r--lang/csharp/src/Internal/DBTYPE.cs2
-rw-r--r--lang/csharp/src/Internal/DB_CHANNEL.cs2
-rw-r--r--lang/csharp/src/Internal/DB_COMPACT.cs2
-rw-r--r--lang/csharp/src/Internal/DB_ENV.cs71
-rw-r--r--lang/csharp/src/Internal/DB_KEY_RANGE.cs2
-rw-r--r--lang/csharp/src/Internal/DB_LOCK.cs2
-rw-r--r--lang/csharp/src/Internal/DB_LOCKREQ.cs2
-rw-r--r--lang/csharp/src/Internal/DB_LSN.cs2
-rw-r--r--lang/csharp/src/Internal/DB_PREPLIST.cs2
-rw-r--r--lang/csharp/src/Internal/DB_REPMGR_SITE.cs2
-rw-r--r--lang/csharp/src/Internal/DB_SEQUENCE.cs8
-rw-r--r--lang/csharp/src/Internal/DB_SITE.cs2
-rw-r--r--lang/csharp/src/Internal/DB_STREAM.cs88
-rw-r--r--lang/csharp/src/Internal/DB_TXN.cs2
-rw-r--r--lang/csharp/src/Internal/DB_TXN_TOKEN.cs2
-rw-r--r--lang/csharp/src/Internal/DbConstants.cs141
-rw-r--r--lang/csharp/src/Internal/Delegates.cs8
-rw-r--r--lang/csharp/src/Internal/StatStructs.cs621
-rw-r--r--lang/csharp/src/Internal/db_lockmode_t.cs2
-rw-r--r--lang/csharp/src/Internal/db_lockop_t.cs2
-rw-r--r--lang/csharp/src/Internal/db_recops.cs2
-rw-r--r--lang/csharp/src/Internal/libdb_csharp.cs2
-rw-r--r--lang/csharp/src/Internal/libdb_csharpPINVOKE.cs86
-rw-r--r--lang/csharp/src/JoinCursor.cs10
-rw-r--r--lang/csharp/src/KeyRange.cs6
-rw-r--r--lang/csharp/src/LSN.cs2
-rw-r--r--lang/csharp/src/Lock.cs2
-rw-r--r--lang/csharp/src/LockDetectMode.cs39
-rw-r--r--lang/csharp/src/LockMode.cs2
-rw-r--r--lang/csharp/src/LockOperation.cs2
-rw-r--r--lang/csharp/src/LockRequest.cs2
-rw-r--r--lang/csharp/src/LockStats.cs17
-rw-r--r--lang/csharp/src/LockingConfig.cs20
-rw-r--r--lang/csharp/src/LockingInfo.cs8
-rw-r--r--lang/csharp/src/LogConfig.cs61
-rw-r--r--lang/csharp/src/LogStats.cs2
-rw-r--r--lang/csharp/src/LogVerifyConfig.cs2
-rw-r--r--lang/csharp/src/MPoolConfig.cs8
-rw-r--r--lang/csharp/src/MPoolFileStats.cs2
-rw-r--r--lang/csharp/src/MPoolStats.cs20
-rw-r--r--lang/csharp/src/MultipleDatabaseEntry.cs2
-rw-r--r--lang/csharp/src/MultipleKeyDatabaseEntry.cs2
-rw-r--r--lang/csharp/src/Mutex.cs2
-rw-r--r--lang/csharp/src/MutexConfig.cs12
-rw-r--r--lang/csharp/src/MutexStats.cs2
-rw-r--r--lang/csharp/src/PreparedTransaction.cs2
-rw-r--r--lang/csharp/src/Properties/AssemblyInfo.cs8
-rw-r--r--lang/csharp/src/QueueDatabase.cs38
-rw-r--r--lang/csharp/src/QueueDatabaseConfig.cs22
-rw-r--r--lang/csharp/src/QueueStats.cs2
-rw-r--r--lang/csharp/src/RecnoCursor.cs6
-rw-r--r--lang/csharp/src/RecnoDatabase.cs54
-rw-r--r--lang/csharp/src/RecnoDatabaseConfig.cs58
-rw-r--r--lang/csharp/src/RecnoStats.cs2
-rw-r--r--lang/csharp/src/RepMgrSite.cs13
-rw-r--r--lang/csharp/src/RepMgrStats.cs41
-rw-r--r--lang/csharp/src/RepProcMsgResult.cs2
-rw-r--r--lang/csharp/src/ReplicationConfig.cs128
-rw-r--r--lang/csharp/src/ReplicationHostAddress.cs2
-rw-r--r--lang/csharp/src/ReplicationStats.cs53
-rw-r--r--lang/csharp/src/SecondaryBTreeDatabase.cs49
-rw-r--r--lang/csharp/src/SecondaryBTreeDatabaseConfig.cs21
-rw-r--r--lang/csharp/src/SecondaryCursor.cs62
-rw-r--r--lang/csharp/src/SecondaryDatabase.cs28
-rw-r--r--lang/csharp/src/SecondaryDatabaseConfig.cs14
-rw-r--r--lang/csharp/src/SecondaryHashDatabase.cs43
-rw-r--r--lang/csharp/src/SecondaryHashDatabaseConfig.cs21
-rw-r--r--lang/csharp/src/SecondaryQueueDatabase.cs18
-rw-r--r--lang/csharp/src/SecondaryQueueDatabaseConfig.cs14
-rw-r--r--lang/csharp/src/SecondaryRecnoDatabase.cs36
-rw-r--r--lang/csharp/src/SecondaryRecnoDatabaseConfig.cs48
-rw-r--r--lang/csharp/src/Sequence.cs24
-rw-r--r--lang/csharp/src/SequenceConfig.cs20
-rw-r--r--lang/csharp/src/SequenceStats.cs6
-rw-r--r--lang/csharp/src/Transaction.cs62
-rw-r--r--lang/csharp/src/TransactionConfig.cs33
-rw-r--r--lang/csharp/src/TransactionStats.cs6
-rw-r--r--lang/csharp/src/VerboseMessages.cs2
-rw-r--r--lang/csharp/src/db_dotnet.csproj9
124 files changed, 3551 insertions, 1726 deletions
diff --git a/lang/csharp/src/AckPolicy.cs b/lang/csharp/src/AckPolicy.cs
index 76b0e2dd..c9e999a3 100644
--- a/lang/csharp/src/AckPolicy.cs
+++ b/lang/csharp/src/AckPolicy.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -11,10 +11,10 @@ using BerkeleyDB.Internal;
namespace BerkeleyDB {
/// <summary>
- /// The AckPolicy class specifies how master and client sites will handle
+ /// The AckPolicy class specifies how master and client sites handle
/// acknowledgment of replication messages which are necessary for
/// "permanent" records. The current implementation requires all sites in a
- /// replication group configure the same acknowledgement policy.
+ /// replication group to configure the same acknowledgement policy.
/// </summary>
public class AckPolicy {
private int _value;
diff --git a/lang/csharp/src/ActiveTransaction.cs b/lang/csharp/src/ActiveTransaction.cs
index 29eb3b7d..b10f1094 100644
--- a/lang/csharp/src/ActiveTransaction.cs
+++ b/lang/csharp/src/ActiveTransaction.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -54,16 +54,16 @@ namespace BerkeleyDB {
public LSN SnapshotReads { get { return _read_lsn; } }
/// <summary>
/// The number of MVCC buffer copies created by this transaction that
- /// remain in cache.
+ /// remains in the cache.
/// </summary>
public uint BufferCopiesInCache { get { return txn.mvcc_ref; } }
/// <summary>
- /// If the transaction is a prepare transaction, the transaction's
+ /// If the transaction is a prepared transaction, return the transaction's
/// Global ID. Otherwise, the GlobalID contents are undefined.
/// </summary>
public byte[] GlobalID { get { return gid; } }
/// <summary>
- /// If a name was specified for the transaction, up to the first 50
+ /// If a name was specified for the transaction, return up to the first 50
/// bytes of that name.
/// </summary>
public string Name { get { return txnname; } }
diff --git a/lang/csharp/src/BTreeCursor.cs b/lang/csharp/src/BTreeCursor.cs
index 616a4b90..6e62c008 100644
--- a/lang/csharp/src/BTreeCursor.cs
+++ b/lang/csharp/src/BTreeCursor.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -30,9 +30,9 @@ namespace BerkeleyDB {
/// <param name="keepPosition">
/// If true, the newly created cursor is initialized to refer to the
/// same position in the database as the original cursor (if any) and
- /// hold the same locks (if any). If false, or the original cursor does
+ /// hold the same locks (if any). If false, or if the original cursor does
/// not hold a database position and locks, the created cursor is
- /// uninitialized and will behave like a cursor newly created by
+ /// uninitialized and behaves like a cursor newly created by
/// <see cref="BTreeDatabase.Cursor"/>.</param>
/// <returns>A newly created cursor</returns>
public new BTreeCursor Duplicate(bool keepPosition) {
@@ -235,6 +235,34 @@ namespace BerkeleyDB {
}
/// <summary>
+ /// Create a database stream pointing to a key/value pair where the
+ /// data item is a blob.
+ /// </summary>
+ /// <returns>A newly created database stream</returns>
+ /// <exception cref="DatabaseException">
+ /// Thrown if the data item is not a blob.
+ /// </exception>
+ public DatabaseStream DbStream() {
+ return DbStream(new DatabaseStreamConfig());
+ }
+
+ /// <summary>
+ /// Create a database stream pointing to a key/value pair where the
+ /// data item is a blob with the given configuration.
+ /// </summary>
+ /// <param name="cfg">
+ /// The configuration properties for the database stream.
+ /// </param>
+ /// <returns>A newly created database stream</returns>
+ /// <exception cref="DatabaseException">
+ /// Thrown if the data of the key/value pair it is pointing to is not
+ /// a blob.
+ /// </exception>
+ public DatabaseStream DbStream(DatabaseStreamConfig cfg) {
+ return new DatabaseStream(dbc.db_stream(cfg.flags), cfg);
+ }
+
+ /// <summary>
/// Return the record number associated with the cursor's current
/// position.
/// </summary>
diff --git a/lang/csharp/src/BTreeDatabase.cs b/lang/csharp/src/BTreeDatabase.cs
index 185b3515..7eab8769 100644
--- a/lang/csharp/src/BTreeDatabase.cs
+++ b/lang/csharp/src/BTreeDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -19,12 +19,16 @@ namespace BerkeleyDB {
private BTreeCompressDelegate compressHandler;
private BTreeDecompressDelegate decompressHandler;
private EntryComparisonDelegate compareHandler, dupCompareHandler;
- private EntryPrefixComparisonDelegate prefixCompareHandler;
+ private EntryPrefixComparisonDelegate prefixCompareHandler;
+ private PartitionDelegate partitionHandler;
private BDB_CompareDelegate doCompareRef;
private BDB_CompareDelegate doDupCompareRef;
private BDB_PrefixCompareDelegate doPrefixCompareRef;
private BDB_CompressDelegate doCompressRef;
private BDB_DecompressDelegate doDecompressRef;
+ private BDB_PartitionDelegate doPartitionRef;
+ private DatabaseEntry[] partitionKeys;
+ private uint nparts;
#region Constructors
private BTreeDatabase(DatabaseEnvironment env, uint flags)
@@ -34,11 +38,17 @@ namespace BerkeleyDB {
private void Config(BTreeDatabaseConfig cfg) {
base.Config(cfg);
/*
- * Database.Config calls set_flags, but that doesn't get the BTree
+ * Database.Config calls set_flags, but that does not get the BTree
* specific flags. No harm in calling it again.
*/
db.set_flags(cfg.flags);
-
+
+ if (cfg.BlobDir != null && cfg.Env == null)
+ db.set_blob_dir(cfg.BlobDir);
+
+ if (cfg.blobThresholdIsSet)
+ db.set_blob_threshold(cfg.BlobThreshold, 0);
+
if (cfg.BTreeCompare != null)
Compare = cfg.BTreeCompare;
@@ -65,6 +75,25 @@ namespace BerkeleyDB {
doDecompressRef = new BDB_DecompressDelegate(doDecompress);
db.set_bt_compress(doCompressRef, doDecompressRef);
}
+
+ if (cfg.partitionIsSet) {
+ nparts = cfg.NParts;
+ Partition = cfg.Partition;
+ if (Partition == null)
+ doPartitionRef = null;
+ else
+ doPartitionRef = new BDB_PartitionDelegate(doPartition);
+ partitionKeys = cfg.PartitionKeys;
+ IntPtr[] ptrs = null;
+ if (partitionKeys != null) {
+ int size = (int)nparts - 1;
+ ptrs = new IntPtr[size];
+ for (int i = 0; i < size; i++)
+ ptrs[i] = DBT.getCPtr(
+ DatabaseEntry.getDBT(partitionKeys[i])).Handle;
+ }
+ db.set_partition(nparts, ptrs, doPartitionRef);
+ }
}
/// <summary>
@@ -80,13 +109,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -110,18 +139,18 @@ namespace BerkeleyDB {
/// object that created it, in circumstances where doing so is safe. If
/// <paramref name="Filename"/> is null and
/// <paramref name="DatabaseName"/> is non-null, the database can be
- /// opened by other threads of control and will be replicated to client
+ /// opened by other threads of control and be replicated to client
/// sites in any replication group.
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file that used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -150,15 +179,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -190,20 +219,20 @@ namespace BerkeleyDB {
/// object that created it, in circumstances where doing so is safe. If
/// <paramref name="Filename"/> is null and
/// <paramref name="DatabaseName"/> is non-null, the database can be
- /// opened by other threads of control and will be replicated to client
+ /// opened by other threads of control and be replicated to client
/// sites in any replication group.
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -235,10 +264,13 @@ namespace BerkeleyDB {
#endregion Constructors
#region Callbacks
- private static int doCompare(IntPtr dbp, IntPtr dbtp1, IntPtr dbtp2) {
+ private static int doCompare(IntPtr dbp,
+ IntPtr dbtp1, IntPtr dbtp2, IntPtr locp) {
DB db = new DB(dbp, false);
DBT dbt1 = new DBT(dbtp1, false);
DBT dbt2 = new DBT(dbtp2, false);
+ if (locp != IntPtr.Zero)
+ locp = IntPtr.Zero;
BTreeDatabase btdb = (BTreeDatabase)(db.api_internal);
return btdb.Compare(
DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
@@ -298,15 +330,23 @@ namespace BerkeleyDB {
}
}
private static int doDupCompare(
- IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p) {
+ IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p, IntPtr locp) {
DB db = new DB(dbp, false);
DBT dbt1 = new DBT(dbt1p, false);
DBT dbt2 = new DBT(dbt2p, false);
+ if (locp != IntPtr.Zero)
+ locp = IntPtr.Zero;
BTreeDatabase btdb = (BTreeDatabase)(db.api_internal);
return btdb.DupCompare(
DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
}
+ private static uint doPartition(IntPtr dbp, IntPtr dbtp) {
+ DB db = new DB(dbp, false);
+ DatabaseEntry dbt = DatabaseEntry.fromDBT(new DBT(dbtp, false));
+ BTreeDatabase btdb = (BTreeDatabase)(db.api_internal);
+ return btdb.Partition(dbt);
+ }
private static uint doPrefixCompare(
IntPtr dbp, IntPtr dbtp1, IntPtr dbtp2) {
DB db = new DB(dbp, false);
@@ -321,6 +361,44 @@ namespace BerkeleyDB {
#region Properties
// Sorted alpha by property name
/// <summary>
+ /// The path of the directory where blobs are stored.
+ /// </summary>
+ public string BlobDir {
+ get {
+ string dir;
+ db.get_blob_dir(out dir);
+ return dir;
+ }
+ }
+
+ internal string BlobSubDir {
+ get {
+ string dir;
+ db.get_blob_sub_dir(out dir);
+ return dir;
+ }
+ }
+
+ /// <summary>
+ /// The threshold value in bytes beyond which data items are stored as
+ /// blobs.
+ /// <para>
+ /// Any data item that is equal to or larger in size than the
+ /// threshold value is automatically stored as a blob.
+ /// </para>
+ /// <para>
+ /// A value of 0 indicates that blobs are not used by the database.
+ /// </para>
+ /// </summary>
+ public uint BlobThreshold {
+ get {
+ uint ret = 0;
+ db.get_blob_threshold(ref ret);
+ return ret;
+ }
+ }
+
+ /// <summary>
/// The Btree key comparison function. The comparison function is called
/// whenever it is necessary to compare a key specified by the
/// application with a key currently stored in the tree.
@@ -376,7 +454,7 @@ namespace BerkeleyDB {
}
/// <summary>
/// Whether the insertion of duplicate data items in the database is
- /// permitted, and whether duplicates items are sorted.
+ /// permitted, and whether duplicate items are sorted.
/// </summary>
public DuplicatesPolicy Duplicates {
get {
@@ -404,6 +482,39 @@ namespace BerkeleyDB {
}
/// <summary>
+ /// Return the number of partitions created in the database.
+ /// </summary>
+ public uint NParts {
+ get {
+ db.get_partition_parts(ref nparts);
+ return nparts;
+ }
+ private set { nparts = value; }
+ }
+
+ /// <summary>
+ /// Return the application-specified partitioning function.
+ /// </summary>
+ public PartitionDelegate Partition {
+ get { return partitionHandler; }
+ private set { partitionHandler = value; }
+ }
+
+ /// <summary>
+ /// Return an array of type DatabaseEntry where each array entry
+ /// contains the range of keys contained in one of the database's
+ /// partitions. The array contains the information for the entire
+ /// database.
+ /// </summary>
+ public DatabaseEntry[] PartitionKeys {
+ get {
+ partitionKeys = db.get_partition_keys();
+ return partitionKeys;
+ }
+ private set { partitionKeys = value; }
+ }
+
+ /// <summary>
/// The Btree prefix function. The prefix function is used to determine
/// the amount by which keys stored on the Btree internal pages can be
/// safely truncated without losing their uniqueness.
@@ -436,7 +547,7 @@ namespace BerkeleyDB {
}
/// <summary>
- /// If false, empty pages will not be coalesced into higher-level pages.
+ /// If false, empty pages are not coalesced into higher-level pages.
/// </summary>
public bool ReverseSplit {
get {
@@ -457,8 +568,8 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If the operation occurs in a transactional database, the operation
- /// will be implicitly transaction protected using multiple
- /// transactions. These transactions will be periodically committed to
+ /// is implicitly transaction protected using multiple
+ /// transactions. These transactions are periodically committed to
/// avoid locking large sections of the tree. Any deadlocks encountered
/// cause the compaction operation to be retried from the point of the
/// last transaction commit.
@@ -480,8 +591,8 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
- /// protected using multiple transactions. These transactions will be
+ /// transactional database, the operation is implicitly transaction
+ /// protected using multiple transactions. These transactions are
/// periodically committed to avoid locking large sections of the tree.
/// Any deadlocks encountered cause the compaction operation to be
/// retried from the point of the last transaction commit.
@@ -610,7 +721,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="isoDegree">
/// The level of isolation for database reads.
- /// <see cref="Isolation.DEGREE_ONE"/> will be silently ignored for
+ /// <see cref="Isolation.DEGREE_ONE"/> is silently ignored for
/// databases which did not specify
/// <see cref="DatabaseConfig.ReadUncommitted"/>.
/// </param>
@@ -714,7 +825,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="BufferSize">
/// The initial size of the buffer to fill with duplicate data items. If
- /// the buffer is not large enough, it will be automatically resized.
+ /// the buffer is not large enough, it is automatically resized.
/// </param>
/// <exception cref="NotFoundException">
/// A NotFoundException is thrown if <paramref name="recno"/> is not in
@@ -738,7 +849,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="BufferSize">
/// The initial size of the buffer to fill with duplicate data items. If
- /// the buffer is not large enough, it will be automatically resized.
+ /// the buffer is not large enough, it is automatically resized.
/// </param>
/// <param name="txn">
/// <paramref name="txn"/> is a Transaction object returned from
@@ -769,7 +880,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="BufferSize">
/// The initial size of the buffer to fill with duplicate data items. If
- /// the buffer is not large enough, it will be automatically resized.
+ /// the buffer is not large enough, it is automatically resized.
/// </param>
/// <param name="txn">
/// <paramref name="txn"/> is a Transaction object returned from
@@ -918,7 +1029,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="isoDegree">
/// The level of isolation for database reads.
- /// <see cref="Isolation.DEGREE_ONE"/> will be silently ignored for
+ /// <see cref="Isolation.DEGREE_ONE"/> is silently ignored for
/// databases which did not specify
/// <see cref="DatabaseConfig.ReadUncommitted"/>.
/// </param>
diff --git a/lang/csharp/src/BTreeDatabaseConfig.cs b/lang/csharp/src/BTreeDatabaseConfig.cs
index 7b53029b..aa96fa88 100644
--- a/lang/csharp/src/BTreeDatabaseConfig.cs
+++ b/lang/csharp/src/BTreeDatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -18,9 +18,8 @@ namespace BerkeleyDB {
public class BTreeDatabaseConfig : DatabaseConfig {
/* Fields for DB->set_flags() */
/// <summary>
- /// Policy for duplicate data items in the database; that is, insertion
- /// when the key of the key/data pair being inserted already exists in
- /// the database will be successful.
+ /// Policy for duplicate data items in the database. Allows a key/data
+ /// pair to be inserted into the database even if the key already exists.
/// </summary>
/// <remarks>
/// <para>The ordering of duplicates in the database for
@@ -32,7 +31,7 @@ namespace BerkeleyDB {
/// duplicate comparison function. If the application does not specify a
/// comparison function using
/// <see cref="DuplicateCompare"/>, a default lexical
- /// comparison will be used.
+ /// comparison is used.
/// </para>
/// <para>
/// <see cref="DuplicatesPolicy.SORTED"/> is preferred to
@@ -42,7 +41,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If the database already exists, the value of Duplicates must be the
- /// same as the existing database or an error will be returned.
+ /// same as the existing database or an error is returned.
/// </para>
/// <para>
/// It is an error to specify <see cref="UseRecordNumbers"/> and
@@ -58,7 +57,7 @@ namespace BerkeleyDB {
/// implementation attempts to coalesce empty pages into higher-level
/// pages in order to keep the database as small as possible and
/// minimize search time. This can hurt performance in applications with
- /// cyclical data demands; that is, applications where the database
+ /// cyclical data demands; applications where the database
/// grows and shrinks repeatedly. For example, because Berkeley DB does
/// page-level locking, the maximum level of concurrency in a database
/// of two pages is far smaller than that in a database of 100 pages, so
@@ -75,7 +74,7 @@ namespace BerkeleyDB {
/// record insertion or deletion. See
/// <see cref="RecnoDatabaseConfig.Renumber"/> for further discussion.
/// </para>
- /// <para>
+ /// <para>
/// Maintaining record counts within a Btree introduces a serious point
/// of contention, namely the page locations where the record counts are
/// stored. In addition, the entire database must be locked during both
@@ -83,13 +82,13 @@ namespace BerkeleyDB {
/// for those operations. Specifying UseRecordNumbers can result in
/// serious performance degradation for some applications and data sets.
/// </para>
- /// <para>
+ /// <para>
/// It is an error to specify <see cref="UseRecordNumbers"/> and
/// anything other than <see cref="DuplicatesPolicy.NONE"/>.
/// </para>
- /// <para>
+ /// <para>
/// If the database already exists, the value of UseRecordNumbers must
- /// be the same as the existing database or an error will be returned.
+ /// be the same as the existing database or an error is returned.
/// </para>
/// </remarks>
public bool UseRecordNumbers;
@@ -103,6 +102,45 @@ namespace BerkeleyDB {
return ret;
}
}
+ /// <summary>
+ /// The path of the directory where blobs are stored.
+ /// <para>
+ /// If the database is opened within <see cref="DatabaseEnvironment"/>,
+ /// this path setting is ignored during
+ /// <see cref="BTreeDatabase.Open"/>. Use
+ /// <see cref="BTreeDatabase.BlobDir"/> to identify the current storage
+ /// location of blobs after opening the database.
+ /// </para>
+ /// </summary>
+ public string BlobDir;
+
+ internal bool blobThresholdIsSet;
+ private uint blobThreshold;
+ /// <summary>
+ /// The size in bytes which is used to determine when a data item
+ /// is stored as a blob.
+ /// <para>
+ /// Any data item that is equal to or larger in size than the
+ /// threshold value is automatically stored as a blob.
+ /// </para>
+ /// <para>
+ /// If the threshold value is 0, blobs are never be used by the
+ /// database.
+ /// </para>
+ /// <para>
+ /// It is illegal to enable blob support in the database which is configured
+ /// as in-memory database or with chksum, encryption, duplicates,
+ /// sorted duplicates, compression, multiversion concurrency control
+ /// and transactional read operations with degree 1 isolation.
+ /// </para>
+ /// </summary>
+ public uint BlobThreshold {
+ get { return blobThreshold; }
+ set {
+ blobThresholdIsSet = true;
+ blobThreshold = value;
+ }
+ }
/// <summary>
/// The policy for how to handle database creation.
@@ -110,7 +148,7 @@ namespace BerkeleyDB {
/// <remarks>
/// If the database does not already exist and
/// <see cref="CreatePolicy.NEVER"/> is set,
- /// <see cref="BTreeDatabase.Open"/> will fail.
+ /// <see cref="BTreeDatabase.Open"/> fails.
/// </remarks>
public CreatePolicy Creation;
internal new uint openFlags {
@@ -130,11 +168,11 @@ namespace BerkeleyDB {
/// compare a key specified by the application with a key currently
/// stored in the tree.
/// </para>
- /// <para>
+ /// <para>
/// If no comparison function is specified, the keys are compared
/// lexically, with shorter keys collating before longer keys.
/// </para>
- /// <para>
+ /// <para>
/// If the database already exists, the comparison function must be the
/// same as that historically used to create the database or corruption
/// can occur.
@@ -153,7 +191,7 @@ namespace BerkeleyDB {
/// works. The usefulness of this is data-dependent, but can produce
/// significantly reduced tree sizes and search times in some data sets.
/// </para>
- /// <para>
+ /// <para>
/// If no prefix function or key comparison function is specified by the
/// application, a default lexical comparison function is used as the
/// prefix function. If no prefix function is specified and
@@ -161,7 +199,7 @@ namespace BerkeleyDB {
/// used. It is an error to specify a prefix function without also
/// specifying <see cref="BTreeCompare"/>.
/// </para>
- /// <para>
+ /// <para>
/// If the database already exists, the prefix function must be the
/// same as that historically used to create the database or corruption
/// can occur.
@@ -179,12 +217,12 @@ namespace BerkeleyDB {
/// setting <see cref="Duplicates"/> to
/// <see cref="DuplicatesPolicy.SORTED"/>.
/// </para>
- /// <para>
+ /// <para>
/// If no comparison function is specified, the data items are compared
/// lexically, with shorter data items collating before longer data
/// items.
/// </para>
- /// <para>
+ /// <para>
/// If the database already exists when
/// <see cref="BTreeDatabase.Open"/> is called, the
/// delegate must be the same as that historically used to create the
@@ -193,7 +231,7 @@ namespace BerkeleyDB {
/// </remarks>
public EntryComparisonDelegate DuplicateCompare;
- internal bool compressionIsSet;
+ internal bool compressionIsSet;
private BTreeCompressDelegate compressFunc;
/// <summary>
/// The compression function used to store key/data pairs in the
@@ -242,14 +280,14 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// This value is used to determine if key or data items will be stored
+ /// This value is used to determine if key or data items are stored
/// on overflow pages instead of Btree leaf pages. For more information
/// on the specific algorithm used, see the Berkeley DB Reference Guide.
/// The value specified must be at least 2; if not explicitly set, a
/// value of 2 is used.
/// </para>
- /// <para>
- /// If the database already exists, MinKeysPerPage will be ignored.
+ /// <para>
+ /// If the database already exists, MinKeysPerPage is ignored.
/// </para>
/// </remarks>
public uint MinKeysPerPage {
@@ -260,6 +298,63 @@ namespace BerkeleyDB {
}
}
+ internal bool partitionIsSet;
+ private PartitionDelegate partitionFunc;
+ /// <summary>
+ /// Return the application-specified partitioning function.
+ /// </summary>
+ public PartitionDelegate Partition { get { return partitionFunc; } }
+ private DatabaseEntry[] partitionKeys;
+ /// <summary>
+ /// Return an array of type DatabaseEntry where each array entry
+ /// contains the range of keys contained in one of the database's
+ /// partitions. The array contains the information for the entire
+ /// database.
+ /// </summary>
+ public DatabaseEntry[] PartitionKeys { get { return partitionKeys; } }
+ private uint nparts;
+ /// <summary>
+ /// Return the number of partitions to create.
+ /// </summary>
+ public uint NParts { get { return nparts; } }
+ private bool SetPartition(uint parts, DatabaseEntry[] partKeys,
+ PartitionDelegate partFunc) {
+ partitionIsSet = true;
+ nparts = parts;
+ partitionKeys = partKeys;
+ partitionFunc = partFunc;
+ if (nparts < 2)
+ partitionIsSet = false;
+ else if (partitionKeys == null && partitionFunc == null)
+ partitionIsSet = false;
+ return partitionIsSet;
+ }
+ /// <summary>
+ /// Enable database partitioning using the specified partition keys.
+ /// Return true if partitioning is successfully enabled; otherwise
+ /// return false.
+ /// <param name="keys">
+ /// An array of DatabaseEntry where each array entry defines the range
+ /// of key values to be stored in each partition
+ /// </param>
+ /// </summary>
+ public bool SetPartitionByKeys(DatabaseEntry[] keys) {
+ uint parts = (keys == null ? 0 : ((uint)keys.Length + 1));
+ return (SetPartition(parts, keys, null));
+ }
+ /// <summary>
+ /// Enable database partitioning using the specified number of
+ /// partitions and partition function.
+ /// Return true if the specified number of partitions are successfully
+ /// enabled; otherwise return false.
+ /// <param name="parts">The number of partitions to create</param>
+ /// <param name="partFunc">The name of partitioning function</param>
+ /// </summary>
+ public bool SetPartitionByCallback(
+ uint parts, PartitionDelegate partFunc) {
+ return (SetPartition(parts, null, partFunc));
+ }
+
/// <summary>
/// Create a new BTreeDatabaseConfig object
/// </summary>
@@ -268,6 +363,8 @@ namespace BerkeleyDB {
NoReverseSplitting = false;
UseRecordNumbers = false;
+ blobThresholdIsSet = false;
+
BTreeCompare = null;
BTreePrefixCompare = null;
diff --git a/lang/csharp/src/BTreeStats.cs b/lang/csharp/src/BTreeStats.cs
index 6abef2b5..9d1f50ad 100644
--- a/lang/csharp/src/BTreeStats.cs
+++ b/lang/csharp/src/BTreeStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -67,6 +67,10 @@ namespace BerkeleyDB {
/// </summary>
public uint MinKey { get { return st.bt_minkey; } }
/// <summary>
+ /// Number of blob records.
+ /// </summary>
+ public uint nBlobRecords { get { return st.bt_nblobs; } }
+ /// <summary>
/// Number of data items.
/// </summary>
public uint nData { get { return st.bt_ndata; } }
diff --git a/lang/csharp/src/BackupOptions.cs b/lang/csharp/src/BackupOptions.cs
index c8d48083..de5c4806 100644
--- a/lang/csharp/src/BackupOptions.cs
+++ b/lang/csharp/src/BackupOptions.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -17,14 +17,13 @@ namespace BerkeleyDB {
public class BackupOptions {
/// <summary>
/// If true, all files are removed from the target backup directory
- /// before the back up is performed.
+ /// before the backup is performed.
/// </summary>
public bool Clean;
/// <summary>
- /// If true, all ordinary files that might exist in the environment, as
- /// well as might exist in the environment's subdirectories, are backed
- /// up; otherwise, only files necessary for the proper operation of
- /// Berkeley DB are backed up.
+ /// If true, all ordinary files that might exist in the environment or
+ /// in the environment's subdirectories are backed up; otherwise, only files
+ /// necessary for the proper operation of Berkeley DB are backed up.
/// </summary>
public bool Files;
/// <summary>
@@ -34,20 +33,20 @@ namespace BerkeleyDB {
public bool NoLogs;
/// <summary>
/// If true, then regardless of the directory structure used by the
- /// source environment, place all back up files in the single target
+ /// source environment, place all backup files in the single target
/// directory. Use this option if absolute path names to your
/// environment directory and the files within that directory are
/// required by your application.
/// </summary>
public bool SingleDir;
/// <summary>
- /// If true, perform an incremental back up, instead of a full back up.
+ /// If true, perform an incremental back up, instead of a full backup.
/// When this option is specified, only log files are copied to the
/// target directory.
/// </summary>
public bool Update;
/// <summary>
- /// Specify whether the target directory will be created if it does not
+ /// Specify whether the target directory is created if it does not
/// already exist.
/// </summary>
public CreatePolicy Creation = CreatePolicy.NEVER;
diff --git a/lang/csharp/src/BaseCursor.cs b/lang/csharp/src/BaseCursor.cs
index 87f22d91..9784750f 100644
--- a/lang/csharp/src/BaseCursor.cs
+++ b/lang/csharp/src/BaseCursor.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -16,7 +16,7 @@ namespace BerkeleyDB {
/// The abstract base class from which all cursor classes inherit.
/// </para>
/// <para>
- /// Cursors may span threads, but only serially, that is, the application
+ /// Cursors may span threads, but only serially. The application
/// must serialize access to the cursor handle.
/// </para>
/// </summary>
@@ -67,9 +67,9 @@ namespace BerkeleyDB {
/// <summary>
/// <para>
/// Discard the cursor.
- /// If you do not close the cursor before closing the database handle or
- ///the transaction handle that owns this cursor,
- ///then, closing a database handle or a transaction handle closes these open cursors.
+ /// If you do not close the cursor before closing the database handle or
+ /// the transaction handle that owns this cursor, then, closing either a
+ /// database or transaction handle closes this cursor.
/// </para>
/// <para>
/// It is possible for the Close() method to throw a
@@ -92,7 +92,7 @@ namespace BerkeleyDB {
/// <summary>
/// Release the resources held by this object, and close the cursor if
- /// it's still open.
+ /// it is still open.
/// </summary>
public void Dispose() {
try {
diff --git a/lang/csharp/src/BaseDatabase.cs b/lang/csharp/src/BaseDatabase.cs
index 40390851..74d5b5e5 100644
--- a/lang/csharp/src/BaseDatabase.cs
+++ b/lang/csharp/src/BaseDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -11,12 +11,12 @@ using BerkeleyDB.Internal;
namespace BerkeleyDB {
/// <summary>
- /// The base class from which all database classes inherit
+ /// The base class from which all database classes inherit.
/// </summary>
public class BaseDatabase : IDisposable {
internal DB db;
/// <summary>
- /// The environment that the database lies in.
+ /// The environment where the database exists.
/// </summary>
protected internal DatabaseEnvironment env;
/// <summary>
@@ -28,6 +28,8 @@ namespace BerkeleyDB {
private DatabaseFeedbackDelegate feedbackHandler;
private BDB_CompareDelegate doDupCompareRef;
private BDB_DbFeedbackDelegate doFeedbackRef;
+ private BDB_MsgcallDelegate doMsgFeedbackRef;
+ private MessageFeedbackDelegate msgFeedbackHandler;
#region Constructors
/// <summary>
@@ -108,6 +110,11 @@ namespace BerkeleyDB {
}
#endregion Constructor
+ private static void doMsgFeedback(IntPtr dbp, string msg) {
+ DB db = new DB(dbp, false);
+ db.api_internal.msgFeedbackHandler(msg);
+ }
+
#region Callbacks
private static void doFeedback(IntPtr dbp, int opcode, int percent) {
DB db = new DB(dbp, false);
@@ -119,7 +126,7 @@ namespace BerkeleyDB {
// Sorted alpha by property name
/// <summary>
/// If true, all database modification operations based on this object
- /// will be transactionally protected.
+ /// are transactionally protected.
/// </summary>
public bool AutoCommit {
get {
@@ -129,7 +136,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// The size of the shared memory buffer pool -- that is, the cache.
+ /// The size of the shared memory buffer pool (the cache).
/// </summary>
public CacheInfo CacheSize {
get {
@@ -222,17 +229,17 @@ namespace BerkeleyDB {
/// <para>
/// When an error occurs in the Berkeley DB library, a
/// <see cref="DatabaseException"/>, or subclass of DatabaseException,
- /// is thrown. In some cases, however, the exception may be insufficient
+ /// is thrown. In some cases the exception may be insufficient
/// to completely describe the cause of the error, especially during
/// initial application debugging.
/// </para>
/// <para>
- /// In some cases, when an error occurs, Berkeley DB will call the given
+ /// In some cases, when an error occurs, Berkeley DB calls the given
/// delegate with additional error information. It is up to the delegate
/// to display the error message in an appropriate manner.
/// </para>
/// <para>
- /// Setting ErrorFeedback to NULL unconfigures the callback interface.
+ /// Setting ErrorFeedback to NULL resets the callback interface.
/// </para>
/// <para>
/// This error-logging enhancement does not slow performance or
@@ -246,7 +253,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// For databases not opened in an environment, setting ErrorFeedback
- /// configures operations performed using the specified object, not all
+ /// configures operations performed using the specified object, instead of all
/// operations performed on the underlying database.
/// </para>
/// </remarks>
@@ -255,6 +262,48 @@ namespace BerkeleyDB {
set { env.ErrorFeedback = value; }
}
/// <summary>
+ /// The mechanism for reporting detailed statistic messages to the
+ /// application.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// There are interfaces in the Berkeley DB library which either
+ /// directly output informational messages or statistical
+ /// information, or configure the library to output such messages
+ /// when performing other operations.
+ /// </para>
+ /// <para>
+ /// Berkeley DB calls the given delegate with each message. It is up
+ /// to the delegate to display the message in an appropriate manner.
+ /// </para>
+ /// <para>
+ /// Setting MessageFeedback to NULL resets the callback interface.
+ /// </para>
+ /// <para>
+ /// For databases opened inside of a DatabaseEnvironment, setting
+ /// MessageFeedback affects the entire environment and is equivalent to
+ /// setting DatabaseEnvironment.MessageFeedback.
+ /// </para>
+ /// <para>
+ /// For databases not opened in an environment, setting MessageFeedback
+ /// configures operations performed using the specified object, instead
+ /// of all operations performed on the underlying database.
+ /// </para>
+ /// </remarks>
+ public MessageFeedbackDelegate messageFeedback {
+ get { return msgFeedbackHandler; }
+ set {
+ if (value == null)
+ db.set_msgcall(null);
+ else if (msgFeedbackHandler == null) {
+ if (doMsgFeedbackRef == null)
+ doMsgFeedbackRef = new BDB_MsgcallDelegate(doMsgFeedback);
+ db.set_msgcall(doMsgFeedbackRef);
+ }
+ msgFeedbackHandler = value;
+ }
+ }
+ /// <summary>
/// The prefix string that appears before error messages issued by
/// Berkeley DB.
/// </summary>
@@ -280,10 +329,9 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// Some operations performed by the Berkeley DB library can take
- /// non-trivial amounts of time. The Feedback delegate can be used by
- /// applications to monitor progress within these operations. When an
- /// operation is likely to take a long time, Berkeley DB will call the
- /// specified delegate with progress information.
+ /// non-trivial amounts of time. When an operation
+ /// is likely to take a long time, Berkeley DB calls the
+ /// the Feedback delegate to monitor progress within these operations.
/// </para>
/// <para>
/// It is up to the delegate to display this information in an
@@ -315,7 +363,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, the object is free-threaded; that is, concurrently usable
+ /// If true, the object is free-threaded; concurrently usable
/// by multiple threads in the address space.
/// </summary>
public bool FreeThreaded {
@@ -350,6 +398,18 @@ namespace BerkeleyDB {
}
}
/// <summary>
+ /// The message file.
+ /// </summary>
+ public string Msgfile {
+ set {
+ int ret = 0;
+ ret = db.set_msgfile(value);
+ if(ret != 0) {
+ throw new Exception("Set message file fails.");
+ }
+ }
+ }
+ /// <summary>
/// <para>
/// If true, this database is not mapped into process memory.
/// </para>
@@ -366,7 +426,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB will not write log records for this database.
+ /// If true, Berkeley DB does not write log records for this database.
/// </summary>
public bool NonDurableTxns {
get {
@@ -377,11 +437,11 @@ namespace BerkeleyDB {
}
/// <summary>
/// If true, configure the database handle to obtain a write lock on the
- /// entire database. When the database is opened it will immediately
- /// throw <see cref="LockNotGrantedException"/> if it cannot obtain the
+ /// entire database. When the database is opened it immediately
+ /// throws <see cref="LockNotGrantedException"/> if it cannot obtain the
/// exclusive lock immediately. If False, configure the database handle
/// to obtain a write lock on the entire database. When the database is
- /// opened, it will block until it can obtain the exclusive lock. If
+ /// opened, it blocks until it can obtain the exclusive lock. If
/// null, do not configure the database handle to obtain a write lock on
/// the entire database.
/// </summary>
@@ -402,7 +462,7 @@ namespace BerkeleyDB {
/// The database's current page size.
/// </summary>
/// <remarks> If <see cref="DatabaseConfig.PageSize"/> was not set by
- /// your application, then the default pagesize is selected based on the
+ /// your application, then the default page size is selected based on the
/// underlying filesystem I/O block size.
/// </remarks>
public uint Pagesize {
@@ -423,7 +483,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, this database has been opened for reading only. Any attempt
+ /// If true, this database has been opened for read only. Any attempt
/// to modify items in the database will fail, regardless of the actual
/// permissions of any underlying files.
/// </summary>
@@ -510,32 +570,32 @@ namespace BerkeleyDB {
/// </summary>
/// <overloads>
/// <para>
- /// Although closing a database will close any open cursors, it is
+ /// Although closing a database also closes any open cursors, it is
/// recommended that applications explicitly close all their Cursor
/// objects before closing the database. The reason why is that when the
/// cursor is explicitly closed, the memory allocated for it is
- /// reclaimed; however, this will not happen if you close a database
+ /// reclaimed; however, this does not happen if you close a database
/// while cursors are still opened.
/// </para>
/// <para>
- /// The same rule, for the same reasons, hold true for
+ /// The same rule, for the same reasons, holds true for
/// <see cref="Transaction"/> objects. Simply make sure you resolve
/// all your transaction objects before closing your database handle.
/// </para>
/// <para>
- /// Because key/data pairs are cached in memory, applications should
+ /// Because key/data pairs are cached in-memory, applications should
/// make a point to always either close database handles or sync their
/// data to disk (using <see cref="Sync"/> before exiting, to
- /// ensure that any data cached in main memory are reflected in the
+ /// ensure that any data cached in main memory is reflected in the
/// underlying file system.
/// </para>
/// <para>
- /// When called on a database that is the primary database for a
- /// secondary index, the primary database should be closed only after
- /// all secondary indices referencing it have been closed.
+ /// When called on a secondary index's primary database, the primary
+ /// should be closed only after all secondary indices referencing
+ /// it have been closed.
/// </para>
/// <para>
- /// When multiple threads are using the object concurrently, only a
+ /// When multiple threads use the object concurrently, only a
/// single thread may call the Close method.
/// </para>
/// <para>
@@ -563,18 +623,17 @@ namespace BerkeleyDB {
/// application crash.
/// </para>
/// <para>
- /// It is important to understand that flushing cached information to
- /// disk only minimizes the window of opportunity for corrupted data.
- /// Although unlikely, it is possible for database corruption to happen
- /// if a system or application crash occurs while writing data to the
- /// database. To ensure that database corruption never occurs,
- /// applications must either use transactions and logging with automatic
- /// recovery or edit a copy of the database, and once all applications
- /// using the database have successfully called Close, atomically
- /// replace the original database with the updated copy.
+ /// Flushing cached information to disk only minimizes the window of opportunity
+ /// for corrupted data. Although unlikely, it is possible for database corruption
+ /// to occur in the event of a system or application crash while writing data to the
+ /// database. To ensure that database corruption never occurs,
+ /// applications must either use transactions and logging with
+ /// automatic recovery, or edit a copy of the database and then replace the corrupted
+ /// database with the updated copy once all applications using the database
+ /// have successfully called <see cref="BaseDatabase.Close"/>.
/// </para>
/// <para>
- /// Note that this parameter only works when the database has been
+ /// This parameter only works when the database has been
/// opened using an environment.
/// </para>
/// </remarks>
@@ -631,7 +690,7 @@ namespace BerkeleyDB {
/// is DatabaseEntry, the key/data pair associated with
/// <paramref name="key"/> is discarded from the database. In the
/// presence of duplicate key values, all records associated with the
- /// designated key will be discarded. If <paramref name="key"/> is
+ /// designated key are discarded. If <paramref name="key"/> is
/// MultipleDatabaseEntry, delete multiple data items using keys from
/// the buffer to which the key parameter refers. If
/// <paramref name="key"/> is MultipleKeyDatabaseEntry, delete multiple
@@ -645,7 +704,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If the operation occurs in a transactional database, the operation
- /// will be implicitly transaction protected.
+ /// is implicitly transaction protected.
/// </para>
/// </remarks>
/// <param name="key">
@@ -669,7 +728,7 @@ namespace BerkeleyDB {
/// is DatabaseEntry, the key/data pair associated with
/// <paramref name="key"/> is discarded from the database. In the
/// presence of duplicate key values, all records associated with the
- /// designated key will be discarded. If <paramref name="key"/> is
+ /// designated key are discarded. If <paramref name="key"/> is
/// MultipleDatabaseEntry, delete multiple data items using keys from
/// the buffer to which the key parameter refers. If
/// <paramref name="key"/> is MultipleKeyDatabaseEntry, delete multiple
@@ -683,7 +742,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null and the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
+ /// transactional database, the operation is implicitly transaction
/// protected.
/// </para>
/// </remarks>
@@ -723,7 +782,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If the operation occurs in a transactional database, the operation
- /// will be implicitly transaction protected.
+ /// is implicitly transaction protected.
/// </remarks>
/// <param name="key">The key to search for.</param>
/// <exception cref="NotFoundException">
@@ -748,7 +807,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If <paramref name="txn"/> is null and the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
+ /// transactional database, the operation is implicitly transaction
/// protected.
/// </remarks>
/// <param name="key">The key to search for.</param>
@@ -782,7 +841,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If <paramref name="txn"/> is null and the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
+ /// transactional database, the operation is implicitly transaction
/// protected.
/// </remarks>
/// <param name="key">The key to search for.</param>
@@ -828,12 +887,12 @@ namespace BerkeleyDB {
/// <summary>
/// Retrieve a key/data pair from the database. In the presence of
- /// duplicate key values, Get will return the first data item for
+ /// duplicate key values, Get returns the first data item for
/// <paramref name="key"/>.
/// </summary>
/// <remarks>
/// If the operation occurs in a transactional database, the operation
- /// will be implicitly transaction protected.
+ /// is implicitly transaction protected.
/// </remarks>
/// <param name="key">The key to search for</param>
/// <exception cref="NotFoundException">
@@ -857,12 +916,12 @@ namespace BerkeleyDB {
}
/// <summary>
/// Retrieve a key/data pair from the database. In the presence of
- /// duplicate key values, Get will return the first data item for
+ /// duplicate key values, Get returns the first data item for
/// <paramref name="key"/>.
/// </summary>
/// <remarks>
/// If <paramref name="txn"/> is null and the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
+ /// transactional database, the operation is implicitly transaction
/// protected.
/// </remarks>
/// <param name="key">The key to search for</param>
@@ -894,12 +953,12 @@ namespace BerkeleyDB {
}
/// <summary>
/// Retrieve a key/data pair from the database. In the presence of
- /// duplicate key values, Get will return the first data item for
+ /// duplicate key values, Get returns the first data item for
/// <paramref name="key"/>.
/// </summary>
/// <remarks>
/// If <paramref name="txn"/> is null and the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
+ /// transactional database, the operation is implicitly transaction
/// protected.
/// </remarks>
/// <param name="key">The key to search for</param>
@@ -932,7 +991,7 @@ namespace BerkeleyDB {
}
/// <summary>
/// Retrieve a key/data pair from the database. In the presence of
- /// duplicate key values, Get will return the first data item for
+ /// duplicate key values, Get returns the first data item for
/// <paramref name="key"/>. If the data is a partial
/// <see cref="DatabaseEntry"/>, <see cref="DatabaseEntry.PartialLen"/>
/// bytes starting <see cref="DatabaseEntry.PartialOffset"/> bytes
@@ -964,7 +1023,7 @@ namespace BerkeleyDB {
}
/// <summary>
/// Retrieve a key/data pair from the database. In the presence of
- /// duplicate key values, Get will return the first data item for
+ /// duplicate key values, Get returns the first data item for
/// <paramref name="key"/>. If the data is a partial
/// <see cref="DatabaseEntry"/>, <see cref="DatabaseEntry.PartialLen"/>
/// bytes starting <see cref="DatabaseEntry.PartialOffset"/> bytes
@@ -975,7 +1034,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If <paramref name="txn"/> is null and the operation occurs in
- /// a transactional database, the operation will be implicitly
+ /// a transactional database, the operation is implicitly
/// transaction protected.
/// </remarks>
/// <param name="key">The key to search for</param>
@@ -1008,7 +1067,7 @@ namespace BerkeleyDB {
}
/// <summary>
/// Retrieve a key/data pair from the database. In the presence of
- /// duplicate key values, Get will return the first data item for
+ /// duplicate key values, Get returns the first data item for
/// <paramref name="key"/>. If the data is a partial
/// <see cref="DatabaseEntry"/>, <see cref="DatabaseEntry.PartialLen"/>
/// bytes starting <see cref="DatabaseEntry.PartialOffset"/> bytes
@@ -1019,7 +1078,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If <paramref name="txn"/> is null and the operation occurs in
- /// a transactional database, the operation will be implicitly
+ /// a transactional database, the operation is implicitly
/// transaction protected.
/// </remarks>
/// <param name="key">The key to search for</param>
@@ -1061,7 +1120,7 @@ namespace BerkeleyDB {
/// <param name="data">
/// The data to search for. If null a new DatabaseEntry is created.
/// </param>
- /// <param name="txn">The txn for this operation.</param>
+ /// <param name="txn">The transaction for this operation.</param>
/// <param name="info">Locking info for this operation.</param>
/// <param name="flags">
/// Flags value specifying which type of get to perform. Passed
@@ -1090,7 +1149,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If the operation occurs in a transactional database, the operation
- /// will be implicitly transaction protected.
+ /// is implicitly transaction protected.
/// </remarks>
/// <param name="key">The key to search for</param>
/// <param name="data">The data to search for</param>
@@ -1119,7 +1178,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If <paramref name="txn"/> is null and the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
+ /// transactional database, the operation is implicitly transaction
/// protected.
/// </remarks>
/// <param name="key">The key to search for</param>
@@ -1156,7 +1215,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If <paramref name="txn"/> is null and the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
+ /// transactional database, the operation is implicitly transaction
/// protected.
/// </remarks>
/// <param name="key">The key to search for</param>
@@ -1355,7 +1414,7 @@ namespace BerkeleyDB {
/// <para>
/// Applications should not rename databases that are currently in use.
/// If an underlying file is being renamed and logging is currently
- /// enabled in the database environment, no database in the file may be
+ /// enabled in the database environment, no database in the file should be
/// open when Rename is called. In particular, some architectures do not
/// permit renaming files with open handles. On these architectures,
/// attempts to rename databases that are currently in use by any thread
@@ -1385,20 +1444,18 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// If the database is in memory only, Sync has no effect and will
- /// always succeed.
+ /// If the database is in-memory only, Sync has no effect and
+ /// always succeeds.
/// </para>
/// <para>
- /// It is important to understand that flushing cached information to
- /// disk only minimizes the window of opportunity for corrupted data.
- /// Although unlikely, it is possible for database corruption to happen
- /// if a system or application crash occurs while writing data to the
+ /// Flushing cached information to disk only minimizes the window of opportunity
+ /// for corrupted data. Although unlikely, it is possible for database corruption
+ /// to occur in the event of a system or application crash while writing data to the
/// database. To ensure that database corruption never occurs,
- /// applications must either: use transactions and logging with
- /// automatic recovery or edit a copy of the database, and once all
- /// applications using the database have successfully called
- /// <see cref="BaseDatabase.Close"/>, atomically replace
- /// the original database with the updated copy.
+ /// applications must either use transactions and logging with
+ /// automatic recovery, or edit a copy of the database and then replace the corrupted
+ /// database with the updated copy once all applications using the database
+ /// have successfully called <see cref="BaseDatabase.Close"/>.
/// </para>
/// </remarks>
public void Sync() {
@@ -1410,11 +1467,11 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If the operation occurs in a transactional database, the operation
- /// will be implicitly transaction protected.
+ /// is implicitly transaction protected.
/// </remarks>
/// <overloads>
/// When called on a database configured with secondary indices,
- /// Truncate will truncate the primary database and all secondary
+ /// This method truncates the primary database and all secondary
/// indices. A count of the records discarded from the primary database
/// is returned.
/// </overloads>
@@ -1429,7 +1486,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If <paramref name="txn"/> is null and the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
+ /// transactional database, the operation is implicitly transaction
/// protected.
/// </remarks>
/// <param name="txn">
@@ -1452,7 +1509,7 @@ namespace BerkeleyDB {
/// <summary>
/// Release the resources held by this object, and close the database if
- /// it's still open.
+ /// it is still open.
/// </summary>
public void Dispose() {
if (isOpen)
diff --git a/lang/csharp/src/ByteOrder.cs b/lang/csharp/src/ByteOrder.cs
index c74d82c3..1bfa7d9b 100644
--- a/lang/csharp/src/ByteOrder.cs
+++ b/lang/csharp/src/ByteOrder.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/CacheInfo.cs b/lang/csharp/src/CacheInfo.cs
index 68681d08..c1b579a3 100644
--- a/lang/csharp/src/CacheInfo.cs
+++ b/lang/csharp/src/CacheInfo.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/CachePriority.cs b/lang/csharp/src/CachePriority.cs
index 5d7eb684..069b6bfc 100644
--- a/lang/csharp/src/CachePriority.cs
+++ b/lang/csharp/src/CachePriority.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/CompactConfig.cs b/lang/csharp/src/CompactConfig.cs
index d19a40cc..38dd969b 100644
--- a/lang/csharp/src/CompactConfig.cs
+++ b/lang/csharp/src/CompactConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -32,29 +32,29 @@ namespace BerkeleyDB {
public bool returnEnd;
/// <summary>
/// If non-null, the starting point for compaction. For a Btree or
- /// Recno database compaction will start at the smallest key greater
- /// than or equal to the starting point. For a Hash database the
- /// compaction will start in the bucket specified by the integer stored
- /// in the starting point. If null, compaction will start at the
+ /// Recno database compaction starts at the smallest key greater
+ /// than or equal to the starting point. For a Hash database,
+ /// compaction starts in the bucket specified by the integer stored
+ /// in the starting point. If null, compaction starts at the
/// beginning of the database.
/// </summary>
public DatabaseEntry start;
/// <summary>
/// If non-null, the stopping point for compaction. For a Btree or
- /// Recno database compaction will stop at the page with the smallest
+ /// Recno database compaction stops at the page with the smallest
/// key greater than the stopping point. For a Hash database
- /// compaction will stop in the bucked specified by the integer stored
- /// in the stopping point. If null, compaction will stop at the
+ /// compaction stops in the bucket specified by the integer stored
+ /// in the stopping point. If null, compaction stops at the
/// end of the database.
/// </summary>
public DatabaseEntry stop;
/// <summary>
/// If true, return pages to the filesystem when possible. If false,
- /// pages emptied as a result of compaction will be placed on the free
+ /// pages emptied as a result of compaction are placed on the free
/// list for re-use, but never returned to the filesystem.
/// </summary>
/// <remarks>
- /// Note that only pages at the end of a file can be returned to the
+ /// Only pages at the end of a file can be returned to the
/// filesystem. Because of the one-pass nature of the compaction
/// algorithm, any unemptied page near the end of the file inhibits
/// returning pages to the file system. A repeated call to
@@ -82,7 +82,7 @@ namespace BerkeleyDB {
/// <summary>
/// If non-zero, this provides the goal for filling pages, specified as
/// a percentage between 1 and 100. Any page not at or above this
- /// percentage full will be considered for compaction. The default
+ /// percentage full is considered for compaction. The default
/// behavior is to consider every page for compaction, regardless of its
/// page fill percentage.
/// </summary>
@@ -94,7 +94,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If non-zero, compaction will complete after the specified number of
+ /// If non-zero, compaction completes after the specified number of
/// pages have been freed.
/// </summary>
public uint Pages {
diff --git a/lang/csharp/src/CompactData.cs b/lang/csharp/src/CompactData.cs
index 202272f4..5ae301b4 100644
--- a/lang/csharp/src/CompactData.cs
+++ b/lang/csharp/src/CompactData.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -30,7 +30,7 @@ namespace BerkeleyDB {
get { return cdata.compact_deadlock; }
}
/// <summary>
- /// The number of empty hash buckets that were found the compaction
+ /// The number of empty hash buckets that were found in the compaction
/// phase.
/// </summary>
public uint EmptyBuckets {
diff --git a/lang/csharp/src/Cursor.cs b/lang/csharp/src/Cursor.cs
index 4474f735..b227259b 100644
--- a/lang/csharp/src/Cursor.cs
+++ b/lang/csharp/src/Cursor.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -12,7 +12,7 @@ using BerkeleyDB.Internal;
namespace BerkeleyDB {
/// <summary>
- /// A class representing database cursors, which allow for traversal of
+ /// A class representing database cursors, which allows for traversal of
/// database records.
/// </summary>
public class Cursor
@@ -61,7 +61,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// Only one of <see cref="Current"/>, <see cref="CurrentMultiple"/> and
- /// <see cref="CurrentMultipleKey"/> will ever be non-empty.
+ /// <see cref="CurrentMultipleKey"/> is ever non-empty.
/// </remarks>
public KeyValuePair<DatabaseEntry, DatabaseEntry> Current {
private set {
@@ -78,7 +78,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// Only one of <see cref="Current"/>, <see cref="CurrentMultiple"/> and
- /// <see cref="CurrentMultipleKey"/> will ever be non-empty.
+ /// <see cref="CurrentMultipleKey"/> is ever non-empty.
/// </remarks>
public
KeyValuePair<DatabaseEntry, MultipleDatabaseEntry> CurrentMultiple {
@@ -95,7 +95,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// Only one of <see cref="Current"/>, <see cref="CurrentMultiple"/> and
- /// <see cref="CurrentMultipleKey"/> will ever be non-empty.
+ /// <see cref="CurrentMultipleKey"/> is ever non-empty.
/// </remarks>
public MultipleKeyDatabaseEntry CurrentMultipleKey {
private set {
@@ -112,22 +112,22 @@ namespace BerkeleyDB {
/// <remarks>
/// The priority of a page biases the replacement algorithm to be more
/// or less likely to discard a page when space is needed in the buffer
- /// pool. The bias is temporary, and pages will eventually be discarded
+ /// pool. The bias is temporary, and pages are eventually discarded
/// if they are not referenced again. The setting is only advisory, and
- /// does not guarantee pages will be treated in a specific way.
+ /// does not guarantee pages are treated in a specific way.
/// </remarks>
public CachePriority Priority {
get {
- uint pri = 0;
- dbc.get_priority(ref pri);
- return CachePriority.fromUInt(pri);
- }
+ uint pri = 0;
+ dbc.get_priority(ref pri);
+ return CachePriority.fromUInt(pri);
+ }
set { dbc.set_priority(value.priority); }
}
internal Cursor(DBC dbc, DatabaseType DbType, uint pagesize)
: base(dbc) {
- Priority = CachePriority.DEFAULT;
+ Priority = CachePriority.DEFAULT;
pgsz = pagesize;
dbtype = DbType;
}
@@ -174,7 +174,7 @@ namespace BerkeleyDB {
/// </summary>
/// <param name="data">The duplicate data item to add</param>
/// <param name="loc">
- /// Whether to add the dup data before or after the current cursor
+ /// Whether to add the duplicate data before or after the current cursor
/// position
/// </param>
protected void Insert(DatabaseEntry data, InsertLocation loc) {
@@ -352,9 +352,9 @@ namespace BerkeleyDB {
/// <param name="keepPosition">
/// If true, the newly created cursor is initialized to refer to the
/// same position in the database as the original cursor (if any) and
- /// hold the same locks (if any). If false, or the original cursor does
+ /// hold the same locks (if any). If false, or if the original cursor does
/// not hold a database position and locks, the created cursor is
- /// uninitialized and will behave like a cursor newly created by
+ /// uninitialized and behaves like a cursor newly created by
/// <see cref="BaseDatabase.Cursor"/>.</param>
/// <returns>A newly created cursor</returns>
public Cursor Duplicate(bool keepPosition) {
@@ -371,7 +371,7 @@ namespace BerkeleyDB {
/// <see cref="Cursor"/>.
/// </summary>
/// <remarks>
- /// The enumerator will begin at the cursor's current position (or the
+ /// The enumerator begins at the cursor's current position (or the
/// first record if the cursor has not yet been positioned) and iterate
/// forwards (i.e. in the direction of <see cref="MoveNext"/>) over the
/// remaining records.
@@ -390,7 +390,7 @@ namespace BerkeleyDB {
/// stored in <see cref="Current"/>.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <returns>
@@ -404,7 +404,7 @@ namespace BerkeleyDB {
/// stored in <see cref="Current"/>.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="info">The locking behavior to use.</param>
@@ -431,7 +431,7 @@ namespace BerkeleyDB {
/// returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -456,7 +456,7 @@ namespace BerkeleyDB {
/// returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -477,8 +477,8 @@ namespace BerkeleyDB {
/// <see cref="CurrentMultiple"/>.
/// </summary>
/// <overloads>
- /// If positioning the cursor fails, <see cref="CurrentMultiple"/> will
- /// contain an empty
+ /// If positioning the cursor fails, <see cref="CurrentMultiple"/>
+ /// contains an empty
/// <see cref="KeyValuePair{T,T}"/>.
/// </overloads>
/// <returns>
@@ -610,7 +610,7 @@ namespace BerkeleyDB {
/// duplicates is stored in <see cref="Current"/>.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The key at which to position the cursor</param>
@@ -633,7 +633,7 @@ namespace BerkeleyDB {
/// duplicates is stored in <see cref="Current"/>.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The key at which to position the cursor</param>
@@ -666,7 +666,7 @@ namespace BerkeleyDB {
/// returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The key at which to position the cursor</param>
@@ -697,7 +697,7 @@ namespace BerkeleyDB {
/// returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The key at which to position the cursor</param>
@@ -725,7 +725,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </para>
/// <para>
@@ -757,7 +757,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </para>
/// <para>
@@ -792,7 +792,7 @@ namespace BerkeleyDB {
/// stored in <see cref="Current"/>.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <returns>
@@ -806,7 +806,7 @@ namespace BerkeleyDB {
/// stored in <see cref="Current"/>.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="info">The locking behavior to use.</param>
@@ -833,7 +833,7 @@ namespace BerkeleyDB {
/// returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -858,7 +858,7 @@ namespace BerkeleyDB {
/// returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -1309,7 +1309,7 @@ namespace BerkeleyDB {
/// value of <see cref="Current">Current.Key</see> may not change.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <returns>
@@ -1324,7 +1324,7 @@ namespace BerkeleyDB {
/// value of <see cref="Current">Current.Key</see> may not change.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="info">The locking behavior to use.</param>
@@ -1352,7 +1352,7 @@ namespace BerkeleyDB {
/// returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -1378,7 +1378,7 @@ namespace BerkeleyDB {
/// returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -1554,12 +1554,12 @@ namespace BerkeleyDB {
/// If the next key/data pair of the database is a duplicate data record
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store that pair in <see cref="Current"/>.
- /// MoveNextDuplicate will return false if the next key/data pair of the
+ /// MoveNextDuplicate returns false if the next key/data pair of the
/// database is not a duplicate data record for the current key/data
/// pair.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <returns>
@@ -1570,12 +1570,12 @@ namespace BerkeleyDB {
/// If the next key/data pair of the database is a duplicate data record
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store that pair in <see cref="Current"/>.
- /// MoveNextDuplicate will return false if the next key/data pair of the
+ /// MoveNextDuplicate returns false if the next key/data pair of the
/// database is not a duplicate data record for the current key/data
/// pair.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="info">The locking behavior to use.</param>
@@ -1592,7 +1592,7 @@ namespace BerkeleyDB {
/// If the next key/data pair of the database is a duplicate data record
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store that pair in <see cref="Current"/>.
- /// MoveNextDuplicate will return false if the next key/data pair of the
+ /// MoveNextDuplicate returns false if the next key/data pair of the
/// database is not a duplicate data record for the current key/data
/// pair. If either the key or the data is partial
/// <see cref="DatabaseEntry"/>, its
@@ -1604,7 +1604,7 @@ namespace BerkeleyDB {
/// bytes are returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -1619,7 +1619,7 @@ namespace BerkeleyDB {
/// If the next key/data pair of the database is a duplicate data record
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store that pair in <see cref="Current"/>.
- /// MoveNextDuplicate will return false if the next key/data pair of the
+ /// MoveNextDuplicate returns false if the next key/data pair of the
/// database is not a duplicate data record for the current key/data
/// pair. If either the key or the data is partial
/// <see cref="DatabaseEntry"/>, its
@@ -1631,7 +1631,7 @@ namespace BerkeleyDB {
/// bytes are returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -1650,7 +1650,7 @@ namespace BerkeleyDB {
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store that pair and as many duplicate data
/// items that can fit in a buffer the size of one database page in
- /// <see cref="CurrentMultiple"/>. MoveNextDuplicateMultiple will return
+ /// <see cref="CurrentMultiple"/>. MoveNextDuplicateMultiple returns
/// false if the next key/data pair of the database is not a duplicate
/// data record for the current key/data pair.
/// </summary>
@@ -1666,7 +1666,7 @@ namespace BerkeleyDB {
/// pair in the database, and store that pair and as many duplicate data
/// items that can fit in a buffer the size of
/// <paramref name="BufferSize"/> in <see cref="CurrentMultiple"/>.
- /// MoveNextDuplicateMultiple will return false if the next key/data
+ /// MoveNextDuplicateMultiple returns false if the next key/data
/// pair of the database is not a duplicate data record for the current
/// key/data pair.
/// </summary>
@@ -1686,7 +1686,7 @@ namespace BerkeleyDB {
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store that pair and as many duplicate data
/// items that can fit in a buffer the size of one database page in
- /// <see cref="CurrentMultiple"/>. MoveNextDuplicateMultiple will return
+ /// <see cref="CurrentMultiple"/>. MoveNextDuplicateMultiple returns
/// false if the next key/data pair of the database is not a duplicate
/// data record for the current key/data pair.
/// </summary>
@@ -1703,7 +1703,7 @@ namespace BerkeleyDB {
/// pair in the database, and store that pair and as many duplicate data
/// items that can fit in a buffer the size of
/// <paramref name="BufferSize"/> in <see cref="CurrentMultiple"/>.
- /// MoveNextDuplicateMultiple will return false if the next key/data
+ /// MoveNextDuplicateMultiple returns false if the next key/data
/// pair of the database is not a duplicate data record for the current
/// key/data pair.
/// </summary>
@@ -1730,8 +1730,8 @@ namespace BerkeleyDB {
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store that pair and as many duplicate data
/// items that can fit in a buffer the size of one database page in
- /// <see cref="CurrentMultipleKey"/>. MoveNextDuplicateMultipleKey will
- /// return false if the next key/data pair of the database is not a
+ /// <see cref="CurrentMultipleKey"/>. MoveNextDuplicateMultipleKey
+ /// returns false if the next key/data pair of the database is not a
/// duplicate data record for the current key/data pair.
/// </summary>
/// <returns>
@@ -1746,7 +1746,7 @@ namespace BerkeleyDB {
/// pair in the database, and store that pair and as many duplicate data
/// items that can fit in a buffer the size of
/// <paramref name="BufferSize"/> in <see cref="CurrentMultipleKey"/>.
- /// MoveNextDuplicateMultipleKey will return false if the next key/data
+ /// MoveNextDuplicateMultipleKey returns false if the next key/data
/// pair of the database is not a duplicate data record for the current
/// key/data pair.
/// </summary>
@@ -1765,8 +1765,8 @@ namespace BerkeleyDB {
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store that pair and as many duplicate data
/// items that can fit in a buffer the size of one database page in
- /// <see cref="CurrentMultipleKey"/>. MoveNextDuplicateMultipleKey will
- /// return false if the next key/data pair of the database is not a
+ /// <see cref="CurrentMultipleKey"/>. MoveNextDuplicateMultipleKey
+ /// returns false if the next key/data pair of the database is not a
/// duplicate data record for the current key/data pair.
/// </summary>
/// <param name="info">The locking behavior to use.</param>
@@ -1782,7 +1782,7 @@ namespace BerkeleyDB {
/// pair in the database, and store that pair and as many duplicate data
/// items that can fit in a buffer the size of
/// <paramref name="BufferSize"/> in <see cref="CurrentMultipleKey"/>.
- /// MoveNextDuplicateMultipleKey will return false if the next key/data
+ /// MoveNextDuplicateMultipleKey returns false if the next key/data
/// pair of the database is not a duplicate data record for the current
/// key/data pair.
/// </summary>
@@ -1807,12 +1807,12 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MoveNextUnique is identical to
/// <see cref="MoveFirst()"/>. Otherwise, move the cursor to the next
/// non-duplicate key in the database, and store that key and associated
- /// datum in <see cref="Current"/>. MoveNextUnique will return false if
+ /// datum in <see cref="Current"/>. MoveNextUnique returns false if
/// no non-duplicate key/data pairs exist after the cursor position in
/// the database.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <returns>
@@ -1823,18 +1823,18 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MoveNextUnique is identical to
/// <see cref="MoveFirst(LockingInfo)"/>. Otherwise, move the cursor to
/// the next non-duplicate key in the database, and store that key and
- /// associated datum in <see cref="Current"/>. MoveNextUnique will
- /// return false if no non-duplicate key/data pairs exist after the
+ /// associated datum in <see cref="Current"/>. MoveNextUnique
+ /// returns false if no non-duplicate key/data pairs exist after the
/// cursor position in the database.
/// </summary>
/// <remarks>
/// <para>
- /// If the database is a Queue or Recno database, MoveNextUnique will
- /// ignore any keys that exist but were never explicitly created by the
+ /// If the database is a Queue or Recno database, MoveNextUnique
+ /// ignores any keys that exist but were never explicitly created by the
/// application, or those that were created and later deleted.
/// </para>
/// <para>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </para>
/// </remarks>
@@ -1852,7 +1852,7 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MoveNextUnique is identical to
/// <see cref="MoveFirst()"/>. Otherwise, move the cursor to the next
/// non-duplicate key in the database, and store that key and associated
- /// datum in <see cref="Current"/>. MoveNextUnique will return false if
+ /// datum in <see cref="Current"/>. MoveNextUnique returns false if
/// no non-duplicate key/data pairs exist after the cursor position in
/// the database. If either the key or the data is
/// partial <see cref="DatabaseEntry"/>, its
@@ -1865,12 +1865,12 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// If the database is a Queue or Recno database, MoveNextUnique will
- /// ignore any keys that exist but were never explicitly created by the
+ /// If the database is a Queue or Recno database, MoveNextUnique
+ /// ignores any keys that exist but were never explicitly created by the
/// application, or those that were created and later deleted.
/// </para>
/// <para>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </para>
/// </remarks>
@@ -1886,8 +1886,8 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MoveNextUnique is identical to
/// <see cref="MoveFirst(LockingInfo)"/>. Otherwise, move the cursor to
/// the next non-duplicate key in the database, and store that key and
- /// associated datum in <see cref="Current"/>. MoveNextUnique will
- /// return false if no non-duplicate key/data pairs exist after the
+ /// associated datum in <see cref="Current"/>. MoveNextUnique
+ /// returns false if no non-duplicate key/data pairs exist after the
/// cursor position in the database. If either the key or the data is
/// partial <see cref="DatabaseEntry"/>, its
/// <see cref="DatabaseEntry.PartialLen"/> bytes starting
@@ -1899,12 +1899,12 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// If the database is a Queue or Recno database, MoveNextUnique will
- /// ignore any keys that exist but were never explicitly created by the
+ /// If the database is a Queue or Recno database, MoveNextUnique
+ /// ignores any keys that exist but were never explicitly created by the
/// application, or those that were created and later deleted.
/// </para>
/// <para>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </para>
/// </remarks>
@@ -1925,7 +1925,7 @@ namespace BerkeleyDB {
/// cursor to the next non-duplicate key in the database, and store that
/// key and associated datum and as many duplicate data items that can
/// fit in a buffer the size of one database page in
- /// <see cref="CurrentMultiple"/>. MoveNextUniqueMultiple will return
+ /// <see cref="CurrentMultiple"/>. MoveNextUniqueMultiple returns
/// false if no non-duplicate key/data pairs exist after the cursor
/// position in the database.
/// </summary>
@@ -1941,7 +1941,7 @@ namespace BerkeleyDB {
/// the cursor to the next non-duplicate key in the database, and store
/// that key and associated datum and as many duplicate data items that
/// can fit in a buffer the size of <paramref name="BufferSize"/> in
- /// <see cref="CurrentMultiple"/>. MoveNextUniqueMultiple will return
+ /// <see cref="CurrentMultiple"/>. MoveNextUniqueMultiple returns
/// false if no non-duplicate key/data pairs exist after the cursor
/// position in the database.
/// </summary>
@@ -1963,7 +1963,7 @@ namespace BerkeleyDB {
/// database, and store that key and associated datum and as many
/// duplicate data items that can fit in a buffer the size of one
/// database page in <see cref="CurrentMultiple"/>.
- /// MoveNextUniqueMultiple will return false if no non-duplicate
+ /// MoveNextUniqueMultiple returns false if no non-duplicate
/// key/data pairs exist after the cursor position in the database.
/// </summary>
/// <param name="info">The locking behavior to use.</param>
@@ -1980,7 +1980,7 @@ namespace BerkeleyDB {
/// database, and store that key and associated datum and as many
/// duplicate data items that can fit in a buffer the size of
/// <paramref name="BufferSize"/> in <see cref="CurrentMultiple"/>.
- /// MoveNextUniqueMultiple will return false if no non-duplicate
+ /// MoveNextUniqueMultiple returns false if no non-duplicate
/// key/data pairs exist after the cursor position in the database.
/// </summary>
/// <param name="BufferSize">
@@ -2006,8 +2006,8 @@ namespace BerkeleyDB {
/// the cursor to the next non-duplicate key in the database, and store
/// that key and associated datum and as many ensuing key/data pairs
/// that can fit in a buffer the size of one database page in
- /// <see cref="CurrentMultipleKey"/>. MoveNextUniqueMultipleKey will
- /// return false if no non-duplicate key/data pairs exist after the
+ /// <see cref="CurrentMultipleKey"/>. MoveNextUniqueMultipleKey
+ /// returns false if no non-duplicate key/data pairs exist after the
/// cursor position in the database.
/// </summary>
/// <returns>
@@ -2023,7 +2023,7 @@ namespace BerkeleyDB {
/// store that key and associated datum and as many ensuing key/data
/// pairs that can fit in a buffer the size of
/// <paramref name="BufferSize"/> in <see cref="CurrentMultipleKey"/>.
- /// MoveNextUniqueMultipleKey will return false if no non-duplicate
+ /// MoveNextUniqueMultipleKey returns false if no non-duplicate
/// key/data pairs exist after the cursor position in the database.
/// </summary>
/// <param name="BufferSize">
@@ -2043,7 +2043,7 @@ namespace BerkeleyDB {
/// database, and store that key and associated datum and as many
/// ensuing key/data pairs that can fit in a buffer the size of one
/// database page in <see cref="CurrentMultipleKey"/>.
- /// MoveNextUniqueMultipleKey will return false if no non-duplicate
+ /// MoveNextUniqueMultipleKey returns false if no non-duplicate
/// key/data pairs exist after the cursor position in the database.
/// </summary>
/// <param name="info">The locking behavior to use.</param>
@@ -2060,7 +2060,7 @@ namespace BerkeleyDB {
/// database, and store that key and associated datum and as many
/// ensuing key/data pairs that can fit in a buffer the size of
/// <paramref name="BufferSize"/> in <see cref="CurrentMultipleKey"/>.
- /// MoveNextUniqueMultipleKey will return false if no non-duplicate
+ /// MoveNextUniqueMultipleKey returns false if no non-duplicate
/// key/data pairs exist after the cursor position in the database.
/// </summary>
/// <param name="BufferSize">
@@ -2088,7 +2088,7 @@ namespace BerkeleyDB {
/// value of <see cref="Current">Current.Key</see> may not change.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <returns>
@@ -2103,7 +2103,7 @@ namespace BerkeleyDB {
/// value of <see cref="Current">Current.Key</see> may not change.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="info">The locking behavior to use.</param>
@@ -2131,7 +2131,7 @@ namespace BerkeleyDB {
/// bytes are returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -2157,7 +2157,7 @@ namespace BerkeleyDB {
/// bytes are returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -2175,12 +2175,12 @@ namespace BerkeleyDB {
/// If the previous key/data pair of the database is a duplicate data
/// record for the current key/data pair, the cursor is moved to the
/// previous key/data pair of the database, and that pair is stored in
- /// <see cref="Current"/>. MovePrevDuplicate will return false if the
+ /// <see cref="Current"/>. MovePrevDuplicate returns false if the
/// previous key/data pair of the database is not a duplicate data
/// record for the current key/data pair.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <returns>
@@ -2191,12 +2191,12 @@ namespace BerkeleyDB {
/// If the previous key/data pair of the database is a duplicate data
/// record for the current key/data pair, the cursor is moved to the
/// previous key/data pair of the database, and that pair is stored in
- /// <see cref="Current"/>. MovePrevDuplicate will return false if the
+ /// <see cref="Current"/>. MovePrevDuplicate returns false if the
/// previous key/data pair of the database is not a duplicate data
/// record for the current key/data pair.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="info">The locking behavior to use.</param>
@@ -2213,7 +2213,7 @@ namespace BerkeleyDB {
/// If the previous key/data pair of the database is a duplicate data
/// record for the current key/data pair, the cursor is moved to the
/// previous key/data pair of the database, and that pair is stored in
- /// <see cref="Current"/>. MovePrevDuplicate will return false if the
+ /// <see cref="Current"/>. MovePrevDuplicate returns false if the
/// previous key/data pair of the database is not a duplicate data
/// record for the current key/data pair. If either the key or the
/// data is partial <see cref="DatabaseEntry"/>, its
@@ -2225,7 +2225,7 @@ namespace BerkeleyDB {
/// bytes are returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -2240,7 +2240,7 @@ namespace BerkeleyDB {
/// If the previous key/data pair of the database is a duplicate data
/// record for the current key/data pair, the cursor is moved to the
/// previous key/data pair of the database, and that pair is stored in
- /// <see cref="Current"/>. MovePrevDuplicate will return false if the
+ /// <see cref="Current"/>. MovePrevDuplicate returns false if the
/// previous key/data pair of the database is not a duplicate data
/// record for the current key/data pair. If either the key or the
/// data is partial <see cref="DatabaseEntry"/>, its
@@ -2252,7 +2252,7 @@ namespace BerkeleyDB {
/// bytes are returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -2270,12 +2270,12 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MovePrevUnique is identical to
/// <see cref="MoveLast()"/>. Otherwise, move the cursor to the previous
/// non-duplicate key in the database, and store that key and associated
- /// datum in <see cref="Current"/>. MovePrevUnique will return false if
+ /// datum in <see cref="Current"/>. MovePrevUnique returns false if
/// no non-duplicate key/data pairs exist after the cursor position in
/// the database.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <returns>
@@ -2286,12 +2286,12 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MovePrevUnique is identical to
/// <see cref="MoveLast(LockingInfo)"/>. Otherwise, move the cursor to
/// the previous non-duplicate key in the database, and store that key
- /// and associated datum in <see cref="Current"/>. MovePrevUnique will
- /// return false if no non-duplicate key/data pairs exist after the
+ /// and associated datum in <see cref="Current"/>. MovePrevUnique
+ /// returns false if no non-duplicate key/data pairs exist after the
/// cursor position in the database.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="info">The locking behavior to use.</param>
@@ -2308,7 +2308,7 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MovePrevUnique is identical to
/// <see cref="MoveLast()"/>. Otherwise, move the cursor to the previous
/// non-duplicate key in the database, and store that key and associated
- /// datum in <see cref="Current"/>. MovePrevUnique will return false if
+ /// datum in <see cref="Current"/>. MovePrevUnique returns false if
/// ntheo non-duplicate key/data pairs exist after the cursor position in
/// database. If either the key or the data is partial
/// <see cref="DatabaseEntry"/>, its
@@ -2320,7 +2320,7 @@ namespace BerkeleyDB {
/// bytes are returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -2335,8 +2335,8 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MovePrevUnique is identical to
/// <see cref="MoveLast(LockingInfo)"/>. Otherwise, move the cursor to
/// the previous non-duplicate key in the database, and store that key
- /// and associated datum in <see cref="Current"/>. MovePrevUnique will
- /// return false if no non-duplicate key/data pairs exist after the
+ /// and associated datum in <see cref="Current"/>. MovePrevUnique
+ /// returns false if no non-duplicate key/data pairs exist after the
/// cursor position in the database. If either the key or the data
/// is partial <see cref="DatabaseEntry"/>, its
/// <see cref="DatabaseEntry.PartialLen"/> bytes starting
@@ -2347,7 +2347,7 @@ namespace BerkeleyDB {
/// bytes are returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -2377,7 +2377,7 @@ namespace BerkeleyDB {
/// <see cref="Current"/>.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <returns>
@@ -2389,7 +2389,7 @@ namespace BerkeleyDB {
/// <see cref="Current"/>.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="info">The locking behavior to use.</param>
@@ -2414,7 +2414,7 @@ namespace BerkeleyDB {
/// bytes are returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
@@ -2437,7 +2437,7 @@ namespace BerkeleyDB {
/// bytes are returned.
/// </summary>
/// <remarks>
- /// If positioning the cursor fails, <see cref="Current"/> will contain
+ /// If positioning the cursor fails, <see cref="Current"/> contains
/// an empty <see cref="KeyValuePair{T,T}"/>.
/// </remarks>
/// <param name="key">The retrieved key</param>
diff --git a/lang/csharp/src/CursorConfig.cs b/lang/csharp/src/CursorConfig.cs
index 8410b612..aa2abf5d 100644
--- a/lang/csharp/src/CursorConfig.cs
+++ b/lang/csharp/src/CursorConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -15,7 +15,7 @@ namespace BerkeleyDB {
/// </summary>
public class CursorConfig {
/// <summary>
- /// The isolation degree the cursor should use.
+ /// The isolation degree that the cursor should use.
/// </summary>
/// <remarks>
/// <para>
@@ -24,7 +24,7 @@ namespace BerkeleyDB {
/// cursor to be modified or deleted prior to the commit of the
/// transaction for this cursor.
/// </para>
- /// <para>
+ /// <para>
/// <see cref="Isolation.DEGREE_ONE"/> allows read operations performed
/// by the cursor to return modified but not yet committed data.
/// Silently ignored if the <see cref="DatabaseConfig.ReadUncommitted"/>
@@ -33,7 +33,7 @@ namespace BerkeleyDB {
/// </remarks>
public Isolation IsolationDegree;
/// <summary>
- /// If true, specify that the cursor will be used to update the
+ /// If true, specify that the cursor is used to update the
/// database. The underlying database environment must have been opened
/// with <see cref="DatabaseEnvironmentConfig.UseCDB"/> set.
/// </summary>
@@ -42,14 +42,14 @@ namespace BerkeleyDB {
/// <para>
/// Configure a transactional cursor to operate with read-only snapshot
/// isolation. For databases with <see cref="DatabaseConfig.UseMVCC"/>
- /// set, data values will be read as they are when the cursor is opened,
+ /// set, data values are read as they are when the cursor is opened,
/// without taking read locks.
/// </para>
- /// <para>
+ /// <para>
/// This setting implicitly begins a transaction that is committed when
/// the cursor is closed.
/// </para>
- /// <para>
+ /// <para>
/// This setting is silently ignored if
/// <see cref="DatabaseConfig.UseMVCC"/> is not set on the underlying
/// database or if a transaction is supplied to
@@ -63,7 +63,7 @@ namespace BerkeleyDB {
/// <remarks>
/// The priority of a page biases the replacement algorithm to be more
/// or less likely to discard a page when space is needed in the buffer
- /// pool. The bias is temporary, and pages will eventually be discarded
+ /// pool. The bias is temporary, and pages are eventually discarded
/// if they are not referenced again. The setting is only advisory, and
/// does not guarantee pages will be treated in a specific way.
/// </remarks>
diff --git a/lang/csharp/src/Database.cs b/lang/csharp/src/Database.cs
index 537005bd..731c86f3 100644
--- a/lang/csharp/src/Database.cs
+++ b/lang/csharp/src/Database.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -51,13 +51,13 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database.
/// </param>
/// <param name="cfg">The database's configuration</param>
@@ -74,24 +74,24 @@ namespace BerkeleyDB {
/// <para>
/// If <paramref name="Filename"/> is null and
/// <paramref name="DatabaseName"/> is non-null, the database can be
- /// opened by other threads of control and will be replicated to client
+ /// opened by other threads of control and be replicated to client
/// sites in any replication group.
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.</param>
/// <param name="DatabaseName">
/// This parameter allows applications to have multiple databases in a
- /// single file. Although no DatabaseName needs to be specified, it is
- /// an error to attempt to open a second database in a file that was not
+ /// single file. Although no DatabaseName needs to be specified, an error
+ /// occurs if you attempt to open a second database in a file that was not
/// initially created using a database name.
/// </param>
/// <param name="cfg">The database's configuration</param>
@@ -114,15 +114,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -154,20 +154,20 @@ namespace BerkeleyDB {
/// object that created it, in circumstances where doing so is safe. If
/// <paramref name="Filename"/> is null and
/// <paramref name="DatabaseName"/> is non-null, the database can be
- /// opened by other threads of control and will be replicated to client
+ /// opened by other threads of control and be replicated to client
/// sites in any replication group.
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -249,7 +249,7 @@ namespace BerkeleyDB {
KeyValuePair<DatabaseEntry, MultipleDatabaseEntry> GetBothMultiple(
DatabaseEntry key, DatabaseEntry data) {
/*
- * Make sure we pass a buffer that's big enough to hold data.Data
+ * Make sure we pass a buffer that is big enough to hold data.Data
* and is a multiple of the page size. Cache this.Pagesize to avoid
* multiple P/Invoke calls.
*/
@@ -266,7 +266,7 @@ namespace BerkeleyDB {
/// <param name="data">The data to search for</param>
/// <param name="BufferSize">
/// The initial size of the buffer to fill with duplicate data items. If
- /// the buffer is not large enough, it will be automatically resized.
+ /// the buffer is not large enough, it is automatically resized.
/// </param>
/// <exception cref="NotFoundException">
/// A NotFoundException is thrown if <paramref name="key"/> and
@@ -297,7 +297,7 @@ namespace BerkeleyDB {
/// <param name="data">The data to search for</param>
/// <param name="BufferSize">
/// The initial size of the buffer to fill with duplicate data items. If
- /// the buffer is not large enough, it will be automatically resized.
+ /// the buffer is not large enough, it is automatically resized.
/// </param>
/// <param name="txn">
/// <paramref name="txn"/> is a Transaction object returned from
@@ -336,7 +336,7 @@ namespace BerkeleyDB {
/// <param name="data">The data to search for</param>
/// <param name="BufferSize">
/// The initial size of the buffer to fill with duplicate data items. If
- /// the buffer is not large enough, it will be automatically resized.
+ /// the buffer is not large enough, it is automatically resized.
/// </param>
/// <param name="txn">
/// <paramref name="txn"/> is a Transaction object returned from
@@ -419,7 +419,7 @@ namespace BerkeleyDB {
/// <param name="key">The key to search for</param>
/// <param name="BufferSize">
/// The initial size of the buffer to fill with duplicate data items. If
- /// the buffer is not large enough, it will be automatically resized.
+ /// the buffer is not large enough, it is automatically resized.
/// </param>
/// <exception cref="NotFoundException">
/// A NotFoundException is thrown if <paramref name="key"/> is not in
@@ -446,7 +446,7 @@ namespace BerkeleyDB {
/// <param name="key">The key to search for</param>
/// <param name="BufferSize">
/// The initial size of the buffer to fill with duplicate data items. If
- /// the buffer is not large enough, it will be automatically resized.
+ /// the buffer is not large enough, it is automatically resized.
/// </param>
/// <param name="txn">
/// <paramref name="txn"/> is a Transaction object returned from
@@ -470,7 +470,7 @@ namespace BerkeleyDB {
/// <param name="key">The key to search for</param>
/// <param name="BufferSize">
/// The initial size of the buffer to fill with duplicate data items. If
- /// the buffer is not large enough, it will be automatically resized.
+ /// the buffer is not large enough, it is automatically resized.
/// </param>
/// <param name="txn">
/// <paramref name="txn"/> is a Transaction object returned from
@@ -539,9 +539,9 @@ namespace BerkeleyDB {
/// <param name="sortCursors">
/// If true, sort the cursors from the one that refers to the least
/// number of data items to the one that refers to the most. If the
- /// data are structured so that cursors with many data items also share
- /// many common elements, higher performance will result from listing
- /// those cursors before cursors with fewer data items; that is, a sort
+ /// data is structured so that cursors with many data items also share
+ /// many common elements, higher performance results from listing
+ /// those cursors before cursors with fewer data items; a sort
/// order other than the default. A setting of false permits
/// applications to perform join optimization prior to calling Join.
/// </param>
@@ -787,7 +787,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="OutputStream">
/// The TextWriter to which the databases' key/data pairs are written.
- /// If null, <see cref="Console.Out"/> will be used.
+ /// If null, <see cref="Console.Out"/> is used.
/// </param>
public static void Salvage(
string file, DatabaseConfig cfg, TextWriter OutputStream) {
@@ -813,7 +813,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="OutputStream">
/// The TextWriter to which the databases' key/data pairs are written.
- /// If null, <see cref="Console.Out"/> will be used.
+ /// If null, <see cref="Console.Out"/> is used.
/// </param>
public static void Salvage(string file,
DatabaseConfig cfg, bool Printable, TextWriter OutputStream) {
@@ -838,12 +838,11 @@ namespace BerkeleyDB {
/// remove data from salvager output.
/// </param>
/// <param name="Aggressive">
- /// If true, output all the key/data pairs in the file that can be
- /// found. Corruption will be assumed and key/data pairs that are
- /// corrupted or have been deleted may appear in the output (even if the
- /// file being salvaged is in no way corrupt), and the output will
- /// almost certainly require editing before being loaded into a
- /// database.
+ /// If true, output all the key/data pairs found in the file.
+ /// Corruption of these data pairs is assumed, and corrupted or deleted
+ /// data pairs may appear in the output (even if the salvaged file is in no
+ /// way corrupt). This output almost certainly requires editing before being
+ /// loaded into a database.
/// </param>
public static void Salvage(string file,
DatabaseConfig cfg, bool Printable, bool Aggressive) {
@@ -868,16 +867,15 @@ namespace BerkeleyDB {
/// remove data from salvager output.
/// </param>
/// <param name="Aggressive">
- /// If true, output all the key/data pairs in the file that can be
- /// found. Corruption will be assumed and key/data pairs that are
- /// corrupted or have been deleted may appear in the output (even if the
- /// file being salvaged is in no way corrupt), and the output will
- /// almost certainly require editing before being loaded into a
- /// database.
+ /// If true, output all the key/data pairs found in the file.
+ /// Corruption of these data pairs is assumed, and corrupted or deleted
+ /// data pairs may appear in the output (even if the salvaged file is in no
+ /// way corrupt). This output almost certainly requires editing before being
+ /// loaded into a database.
/// </param>
/// <param name="OutputStream">
/// The TextWriter to which the databases' key/data pairs are written.
- /// If null, <see cref="Console.Out"/> will be used.
+ /// If null, <see cref="Console.Out"/> is used.
/// </param>
public static void Salvage(string file, DatabaseConfig cfg,
bool Printable, bool Aggressive, TextWriter OutputStream) {
@@ -939,7 +937,7 @@ namespace BerkeleyDB {
/// single database, if the databases do not support duplicate data
/// items, or if all of the databases that support duplicate data items
/// support the same style of duplicates (either sorted or unsorted),
- /// Upgrade will work correctly as long as
+ /// Upgrade works correctly as long as
/// <paramref name="dupSortUpgraded"/> is correctly specified.
/// Otherwise, the file cannot be upgraded using Upgrade it must be
/// upgraded manually by dumping and reloading the databases.
diff --git a/lang/csharp/src/DatabaseConfig.cs b/lang/csharp/src/DatabaseConfig.cs
index e564f8f2..e038ae2c 100644
--- a/lang/csharp/src/DatabaseConfig.cs
+++ b/lang/csharp/src/DatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -15,14 +15,14 @@ namespace BerkeleyDB {
public class DatabaseConfig {
/// <summary>
/// The Berkeley DB environment within which to create a database. If
- /// null, the database will be created stand-alone; that is, it is not
+ /// null, the database is created stand-alone; it is not
/// part of any Berkeley DB environment.
/// </summary>
/// <remarks>
/// The database access methods automatically make calls to the other
/// subsystems in Berkeley DB, based on the enclosing environment. For
/// example, if the environment has been configured to use locking, the
- /// access methods will automatically acquire the correct locks when
+ /// access methods automatically acquire the correct locks when
/// reading and writing pages of the database.
/// </remarks>
public DatabaseEnvironment Env;
@@ -33,14 +33,14 @@ namespace BerkeleyDB {
/// <remarks>
/// The priority of a page biases the replacement algorithm to be more
/// or less likely to discard a page when space is needed in the buffer
- /// pool. The bias is temporary, and pages will eventually be discarded
+ /// pool. The bias is temporary, and pages are eventually discarded
/// if they are not referenced again. This priority is only advisory,
/// and does not guarantee pages will be treated in a specific way.
/// </remarks>
public CachePriority Priority;
/// <summary>
- /// The size of the shared memory buffer pool -- that is, the cache.
+ /// The size of the shared memory buffer pool (the cache).
/// </summary>
/// <remarks>
/// <para>
@@ -49,13 +49,13 @@ namespace BerkeleyDB {
/// situations. (Note: the working set is not the same as the number of
/// pages accessed simultaneously, and is usually much larger.)
/// </para>
- /// <para>
+ /// <para>
/// The default cache size is 256KB, and may not be specified as less
/// than 20KB. Any cache size less than 500MB is automatically increased
/// by 25% to account for buffer pool overhead; cache sizes larger than
/// 500MB are used as specified. The maximum size of a single cache is
/// 4GB on 32-bit systems and 10TB on 64-bit systems. (All sizes are in
- /// powers-of-two, that is, 256KB is 2^18 not 256,000.) For information
+ /// powers-of-two, 256KB is 2^18 not 256,000.) For information
/// on tuning the Berkeley DB cache size, see Selecting a cache size in
/// the Programmer's Reference Guide.
/// </para>
@@ -70,13 +70,13 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// The access methods provide no guarantees about the byte ordering of
- /// the application data stored in the database, and applications are
+ /// the application data stored in the database. Applications are
/// responsible for maintaining any necessary ordering.
/// </para>
- /// <para>
+ /// <para>
/// If creating additional databases in a single physical file, this
- /// parameter will be ignored and the byte order of the existing
- /// databases will be used.
+ /// parameter is ignored and the byte order of the existing
+ /// databases is used.
/// </para>
/// </remarks>
public ByteOrder ByteOrder = ByteOrder.MACHINE;
@@ -94,14 +94,14 @@ namespace BerkeleyDB {
/// filesystem I/O block size. The automatically selected size has a
/// lower limit of 512 bytes and an upper limit of 16K bytes.
/// </para>
- /// <para>
- /// For information on tuning the Berkeley DB page size, see Selecting a
- /// page size in the Programmer's Reference Guide.
+ /// <para>
+ /// For information on tuning the Berkeley DB page size, see the "Selecting a
+ /// page size" section in the Programmer's Reference Guide.
/// </para>
/// <para>
/// If creating additional databases in a single physical file, this
- /// parameter will be ignored and the page size of the existing
- /// databases will be used.
+ /// parameter is ignored and the page size of the existing
+ /// databases is used.
/// </para>
/// </remarks>
public uint PageSize {
@@ -150,7 +150,7 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// If the database already exists, the value of Encrypted must be the
- /// same as the existing database or an error will be returned.
+ /// same as the existing database or an error is returned.
/// </para>
/// <para>
/// Encrypted databases are not portable between machines of different
@@ -173,7 +173,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// In some cases, when an error occurs, Berkeley DB will call
+ /// In some cases, when an error occurs, Berkeley DB calls
/// ErrorFeedback with additional error information. It is up to the
/// delegate function to display the error message in an appropriate
/// manner.
@@ -183,7 +183,7 @@ namespace BerkeleyDB {
/// significantly increase application size, and may be run during
/// normal operation as well as during application debugging.
/// </para>
- /// <para>
+ /// <para>
/// For databases opened inside of Berkeley DB environments, setting
/// ErrorFeedback affects the entire environment and is equivalent to
/// setting <see cref="DatabaseEnvironment.ErrorFeedback"/>.
@@ -205,21 +205,21 @@ namespace BerkeleyDB {
/// Berkeley DB uses the SHA1 Secure Hash Algorithm if encryption is
/// configured and a general hash algorithm if it is not.
/// </para>
- /// <para>
- /// If the database already exists, this setting will be ignored.
+ /// <para>
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public bool DoChecksum;
/// <summary>
- /// If true, Berkeley DB will not write log records for this database.
+ /// If true, Berkeley DB does not write log records for this database.
/// </summary>
/// <remarks>
/// If Berkeley DB does not write log records, updates of this database
- /// will exhibit the ACI (atomicity, consistency, and isolation)
- /// properties, but not D (durability); that is, database integrity will
- /// be maintained, but if the application or system fails, integrity
- /// will not persist. The database file must be verified and/or restored
+ /// exhibit the ACI (atomicity, consistency, and isolation)
+ /// properties, but not D (durability); database integrity
+ /// persists if the application or system does not fail.
+ /// The database file must be verified and/or restored
/// from backup after a failure. In order to ensure integrity after
/// application shut down, the database must be synced when closed, or
/// all database changes must be flushed from the database environment
@@ -239,10 +239,10 @@ namespace BerkeleyDB {
/// <para>
/// If true, configure the <see cref="BaseDatabase"/> handle to obtain a
/// write lock on the entire database. When the database is opened it
- /// will immediately throw <see cref="LockNotGrantedException"/> if it
+ /// immediately throws <see cref="LockNotGrantedException"/> if it
/// cannot obtain the exclusive lock immediately. If False, configure
/// the <see cref="BaseDatabase"/> handle to obtain a write lock on the
- /// entire database. When the database is opened, it will block until it
+ /// entire database. When the database is opened, it blocks until it
/// can obtain the exclusive lock. If null, do not configure the
/// <see cref="BaseDatabase"/> handle to obtain a write lock on the
/// entire database.
@@ -262,13 +262,13 @@ namespace BerkeleyDB {
/// <summary>
/// Enclose the open call within a transaction. If the call succeeds,
- /// the open operation will be recoverable and all subsequent database
+ /// the open operation is recoverable and all subsequent database
/// modification operations based on this handle will be transactionally
- /// protected. If the call fails, no database will have been created.
+ /// protected. If the call fails, no database has been created.
/// </summary>
public bool AutoCommit;
/// <summary>
- /// Cause the database object to be free-threaded; that is, concurrently
+ /// Causes the database object to be free-threaded; that is, concurrently
/// usable by multiple threads in the address space.
/// </summary>
public bool FreeThreaded;
@@ -302,7 +302,7 @@ namespace BerkeleyDB {
/// For this reason, it is applicable only to the file and cannot be
/// used to discard databases within a file.
/// </para>
- /// <para>
+ /// <para>
/// This setting cannot be lock or transaction-protected, and it is an
/// error to specify it in a locking or transaction-protected
/// environment.
@@ -313,10 +313,11 @@ namespace BerkeleyDB {
/// Open the database with support for multiversion concurrency control.
/// </summary>
/// <remarks>
- /// This will cause updates to the database to follow a copy-on-write
- /// protocol, which is required to support snapshot isolation. This
- /// settting requires that the database be transactionally protected
- /// during its open and is not supported by the queue format.
+ /// Enables database updates to follow a copy-on-write protocol, which
+ /// is required to support snapshot isolation. This
+ /// setting requires the database to be transactionally protected
+ /// when it is opened(or, sometimes, at open time). Also, this setting is
+ /// not supported by the queue format.
/// </remarks>
public bool UseMVCC;
internal uint openFlags {
diff --git a/lang/csharp/src/DatabaseEntry.cs b/lang/csharp/src/DatabaseEntry.cs
index 4c8f4324..38bcef1a 100644
--- a/lang/csharp/src/DatabaseEntry.cs
+++ b/lang/csharp/src/DatabaseEntry.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -116,10 +116,24 @@ namespace BerkeleyDB {
}
}
- /// <summary>
- /// Set this DatabaseEntry as read only - that is Berkeley DB will not
- /// alter the entry.
- /// </summary>
+ /// <summary>
+ /// Whether the record data will be stored as a blob,
+ /// regardless of size.
+ /// </summary>
+ public bool Blob {
+ get { return (dbt.flags & DbConstants.DB_DBT_BLOB) != 0; }
+ set {
+ if (value == true)
+ dbt.flags |= DbConstants.DB_DBT_BLOB;
+ else
+ dbt.flags &= ~DbConstants.DB_DBT_BLOB;
+ }
+ }
+
+ /// <summary>
+ /// Set this DatabaseEntry as read only - Berkeley DB cannot
+ /// alter the entry.
+ /// </summary>
public bool ReadOnly {
get { return (flags & DbConstants.DB_DBT_READONLY) != 0; }
set {
diff --git a/lang/csharp/src/DatabaseEnvironment.cs b/lang/csharp/src/DatabaseEnvironment.cs
index 8c5828e9..47f03749 100644
--- a/lang/csharp/src/DatabaseEnvironment.cs
+++ b/lang/csharp/src/DatabaseEnvironment.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -24,7 +24,9 @@ namespace BerkeleyDB {
private ThreadIsAliveDelegate isAliveHandler;
private EventNotifyDelegate notifyHandler;
private MessageDispatchDelegate messageDispatchHandler;
+ private MessageFeedbackDelegate msgFeedbackHandler;
private ReplicationTransportDelegate transportHandler;
+ private ReplicationViewDelegate replicationViewHandler;
private SetThreadIDDelegate threadIDHandler;
private SetThreadNameDelegate threadNameHandler;
private string _pfx;
@@ -37,6 +39,8 @@ namespace BerkeleyDB {
private BDB_EventNotifyDelegate doNotifyRef;
private BDB_IsAliveDelegate doIsAliveRef;
private BDB_MessageDispatchDelegate doMessageDispatchRef;
+ private BDB_MsgcallDelegate doMsgFeedbackRef;
+ private BDB_ReplicationViewDelegate doRepViewRef;
private BDB_RepTransportDelegate doRepTransportRef;
private BDB_ThreadIDDelegate doThreadIDRef;
private BDB_ThreadNameDelegate doThreadNameRef;
@@ -87,6 +91,10 @@ namespace BerkeleyDB {
dbenv.api2_internal.errFeedbackHandler(
dbenv.api2_internal._pfx, msg);
}
+ private static void doMsgFeedback(IntPtr env, string msg) {
+ DB_ENV dbenv = new DB_ENV(env, false);
+ dbenv.api2_internal.msgFeedbackHandler(msg);
+ }
private static void doFeedback(IntPtr env, int opcode, int percent) {
DB_ENV dbenv = new DB_ENV(env, false);
dbenv.api2_internal.feedbackHandler(
@@ -113,6 +121,12 @@ namespace BerkeleyDB {
dbenv.api2_internal.messageDispatchHandler(
dbchannel, ref requests, out nrequest, need_response);
}
+ private static int doRepView(IntPtr envp,
+ string name, ref int result, uint flags) {
+ DB_ENV dbenv = new DB_ENV(envp, false);
+ return dbenv.api2_internal.replicationViewHandler(name,
+ ref result, flags);
+ }
private static int doRepTransport(IntPtr envp,
IntPtr controlp, IntPtr recp, IntPtr lsnp, int envid, uint flags) {
DB_ENV dbenv = new DB_ENV(envp, false);
@@ -129,7 +143,7 @@ namespace BerkeleyDB {
DbThreadID id = dbenv.api2_internal.threadIDHandler();
/*
- * Sometimes the library doesn't care about either pid or tid
+ * Sometimes the library does not care about either pid or tid
* (usually tid) and will pass NULL instead of a valid pointer.
*/
if (pid != IntPtr.Zero)
@@ -177,6 +191,10 @@ namespace BerkeleyDB {
//Alpha by dbenv function call
foreach (string dirname in cfg.DataDirs)
dbenv.add_data_dir(dirname);
+ if (cfg.BlobDir != null)
+ dbenv.set_blob_dir(cfg.BlobDir);
+ if (cfg.blobThresholdIsSet)
+ dbenv.set_blob_threshold(cfg.BlobThreshold, 0);
if (cfg.CreationDir != null)
dbenv.set_create_dir(cfg.CreationDir);
if (cfg.encryptionIsSet)
@@ -330,6 +348,14 @@ namespace BerkeleyDB {
RepNSites = cfg.RepSystemCfg.NSites;
for (int i = 0; i < cfg.RepSystemCfg.RepmgrSitesConfig.Count; i++)
RepMgrSiteConfig(cfg.RepSystemCfg.RepmgrSitesConfig[i]);
+ if (cfg.RepSystemCfg.repViewIsSet) {
+ ReplicationView = cfg.RepSystemCfg.ReplicationView;
+ if (ReplicationView == null)
+ doRepViewRef = null;
+ else
+ doRepViewRef = new BDB_ReplicationViewDelegate(doRepView);
+ dbenv.rep_set_view(doRepViewRef);
+ }
if (cfg.RepSystemCfg.priorityIsSet)
RepPriority = cfg.RepSystemCfg.Priority;
if (cfg.RepSystemCfg.RepMgrAckPolicy != null)
@@ -344,10 +370,18 @@ namespace BerkeleyDB {
RepSetTransmitLimit(
cfg.RepSystemCfg.TransmitLimitGBytes,
cfg.RepSystemCfg.TransmitLimitBytes);
+ if (cfg.RepSystemCfg.repmgrIncomingQueueMaxIsSet)
+ RepmgrSetIncomingQueueMax(
+ cfg.RepSystemCfg.RepmgrIncomingQueueMaxGBytes,
+ cfg.RepSystemCfg.RepmgrIncomingQueueMaxBytes);
if (cfg.RepSystemCfg.UseMasterLeases)
RepUseMasterLeases = true;
if (!cfg.RepSystemCfg.Elections)
RepMgrRunElections = false;
+ if (cfg.RepSystemCfg.PrefmasMaster)
+ RepPrefmasMaster = true;
+ if (cfg.RepSystemCfg.PrefmasClient)
+ RepPrefmasClient = true;
}
}
@@ -356,7 +390,7 @@ namespace BerkeleyDB {
/// <summary>
/// If true, database operations for which no explicit transaction
/// handle was specified, and which modify databases in the database
- /// environment, will be automatically enclosed within a transaction.
+ /// environment, are automatically enclosed within a transaction.
/// </summary>
public bool AutoCommit {
get {
@@ -477,7 +511,44 @@ namespace BerkeleyDB {
}
/// <summary>
- /// The size of the shared memory buffer pool -- that is, the cache.
+ /// The path of the directory where blobs are stored.
+ /// </summary>
+ public string BlobDir {
+ get {
+ string dir;
+ dbenv.get_blob_dir(out dir);
+ return dir;
+ }
+ }
+ /// <summary>
+ /// The size in bytes which is used to determine when a data item
+ /// is stored as a blob.
+ /// <para>
+ /// Any data item that is equal to or larger in size than the
+ /// threshold value is automatically stored as a blob.
+ /// </para>
+ /// <para>
+ /// If the threshold value is 0, databases opened in the environment
+ /// default to never using blob support.
+ /// </para>
+ /// <para>
+ /// It is illegal to enable blob support if replication is enabled for the
+ /// environment.
+ /// </para>
+ /// </summary>
+ public uint BlobThreshold {
+ get {
+ uint ret = 0;
+ dbenv.get_blob_threshold(ref ret);
+ return ret;
+ }
+ set {
+ dbenv.set_blob_threshold(value, 0);
+ }
+ }
+
+ /// <summary>
+ /// The size of the shared memory buffer pool (the cache).
/// </summary>
/// <remarks>
/// <para>
@@ -492,7 +563,7 @@ namespace BerkeleyDB {
/// by 25% to account for buffer pool overhead; cache sizes larger than
/// 500MB are used as specified. The maximum size of a single cache is
/// 4GB on 32-bit systems and 10TB on 64-bit systems. (All sizes are in
- /// powers-of-two, that is, 256KB is 2^18 not 256,000.) For information
+ /// powers-of-two, 256KB is 2^18 not 256,000.) For information
/// on tuning the Berkeley DB cache size, see Selecting a cache size in
/// the Programmer's Reference Guide.
/// </para>
@@ -512,7 +583,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB Concurrent Data Store applications will perform
+ /// If true, Berkeley DB Concurrent Data Store applications perform
/// locking on an environment-wide basis rather than on a per-database
/// basis.
/// </summary>
@@ -524,7 +595,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB subsystems will create any underlying files, as
+ /// If true, Berkeley DB subsystems create any underlying files, as
/// necessary.
/// </summary>
public bool Create {
@@ -540,10 +611,10 @@ namespace BerkeleyDB {
public List<string> DataDirs { get { return dbenv.get_data_dirs(); } }
/// <summary>
- /// The deadlock detector configuration, specifying what lock request(s)
+ /// The deadlock detector configuration, specifying which lock request(s)
/// should be rejected. As transactions acquire locks on behalf of a
/// single locker ID, rejecting a lock request associated with a
- /// transaction normally requires the transaction be aborted.
+ /// transaction normally requires the transaction to be aborted.
/// </summary>
public DeadlockPolicy DeadlockResolution {
get {
@@ -578,24 +649,24 @@ namespace BerkeleyDB {
/// <para>
/// When an error occurs in the Berkeley DB library, a
/// <see cref="DatabaseException"/>, or subclass of DatabaseException,
- /// is thrown. In some cases, however, the exception may be insufficient
+ /// is thrown. In some cases the exception may be insufficient
/// to completely describe the cause of the error, especially during
/// initial application debugging.
/// </para>
- /// <para>
- /// In some cases, when an error occurs, Berkeley DB will call the given
+ /// <para>
+ /// In some cases, when an error occurs, Berkeley DB calls the given
/// delegate with additional error information. It is up to the delegate
/// to display the error message in an appropriate manner.
/// </para>
- /// <para>
+ /// <para>
/// Setting ErrorFeedback to NULL unconfigures the callback interface.
/// </para>
- /// <para>
+ /// <para>
/// This error-logging enhancement does not slow performance or
/// significantly increase application size, and may be run during
/// normal operation as well as during application debugging.
/// </para>
- /// </remarks>
+ /// </remarks>
public ErrorFeedbackDelegate ErrorFeedback {
get { return errFeedbackHandler; }
set {
@@ -610,6 +681,38 @@ namespace BerkeleyDB {
}
}
/// <summary>
+ /// The mechanism for reporting detailed statistic messages to the
+ /// application.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// There are interfaces in the Berkeley DB library which either
+ /// directly output informational messages or statistical
+ /// information, or configure the library to output such messages
+ /// when performing other operations.
+ /// </para>
+ /// <para>
+ /// Berkeley DB calls the given delegate with each message. It is up
+ /// to the delegate to display the message in an appropriate manner.
+ /// </para>
+ /// <para>
+ /// Setting MessageFeedback to NULL resets the callback interface.
+ /// </para>
+ /// </remarks>
+ public MessageFeedbackDelegate messageFeedback {
+ get { return msgFeedbackHandler; }
+ set {
+ if (value == null)
+ dbenv.set_msgcall(null);
+ else if (msgFeedbackHandler == null) {
+ if (doMsgFeedbackRef == null)
+ doMsgFeedbackRef = new BDB_MsgcallDelegate(doMsgFeedback);
+ dbenv.set_msgcall(doMsgFeedbackRef);
+ }
+ msgFeedbackHandler = value;
+ }
+ }
+ /// <summary>
/// The prefix string that appears before error messages issued by
/// Berkeley DB.
/// </summary>
@@ -619,7 +722,7 @@ namespace BerkeleyDB {
/// ErrorPrefix affects the entire environment and is equivalent to
/// setting <see cref="DatabaseEnvironment.ErrorPrefix"/>.
/// </para>
- /// <para>
+ /// <para>
/// Setting ErrorPrefix configures operations performed using the
/// specified object, not all operations performed on the underlying
/// database.
@@ -654,10 +757,9 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// Some operations performed by the Berkeley DB library can take
- /// non-trivial amounts of time. The Feedback delegate can be used by
- /// applications to monitor progress within these operations. When an
- /// operation is likely to take a long time, Berkeley DB will call the
- /// specified delegate with progress information.
+ /// non-trivial amounts of time. When an operation
+ /// is likely to take a long time, Berkeley DB calls the
+ /// the Feedback delegate to monitor progress within these operations.
/// </para>
/// <para>
/// It is up to the delegate to display this information in an
@@ -685,7 +787,7 @@ namespace BerkeleyDB {
/// <remarks>
/// This flag may result in inaccurate file modification times and other
/// file-level information for Berkeley DB database files. This flag
- /// will almost certainly result in a performance decrease on most
+ /// almost certainly results in a performance decrease on most
/// systems.
/// </remarks>
public bool ForceFlush {
@@ -828,7 +930,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB will page-fault shared regions into memory when
+ /// If true, Berkeley DB page-faults shared regions into memory when
/// initially creating or joining a Berkeley DB environment.
/// </summary>
/// <remarks>
@@ -839,7 +941,7 @@ namespace BerkeleyDB {
/// convoy, and overall throughput may decrease.)
/// </para>
/// <para>
- /// In addition to page-faulting, Berkeley DB will write the shared
+ /// In addition to page-faulting, Berkeley DB writes the shared
/// regions when creating an environment, forcing the underlying virtual
/// memory and filesystems to instantiate both the necessary memory and
/// the necessary disk space. This can also avoid out-of-disk space
@@ -952,6 +1054,20 @@ namespace BerkeleyDB {
}
}
/// <summary>
+ /// If true, enables full logging of blob data.
+ /// Required if using HA or the hotbackup utility.
+ /// </summary>
+ public bool LogBlobContent {
+ get {
+ int onoff = 0;
+ dbenv.log_get_config(DbConstants.DB_LOG_BLOB, ref onoff);
+ return (onoff != 0);
+ }
+ set {
+ dbenv.log_set_config(DbConstants.DB_LOG_BLOB, value ? 1 : 0);
+ }
+ }
+ /// <summary>
/// The size of the in-memory log buffer, in bytes
/// </summary>
public uint LogBufferSize {
@@ -966,7 +1082,7 @@ namespace BerkeleyDB {
}
/// <summary>
/// The path of a directory to be used as the location of logging files.
- /// Log files created by the Log Manager subsystem will be created in
+ /// Log files created by the Log Manager subsystem are created in
/// this directory.
/// </summary>
public string LogDir {
@@ -986,7 +1102,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// Normally, if Berkeley DB applications set their umask appropriately,
- /// all processes in the application suite will have read permission on
+ /// all processes in the application suite obtain read permission on
/// the log files created by any process in the application suite.
/// However, if the Berkeley DB application is a library, a process
/// using the library might set its umask to a value preventing other
@@ -1019,7 +1135,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB will flush log writes to the backing disk
+ /// If true, Berkeley DB flushes log writes to the backing disk
/// before returning from the write system call, rather than flushing
/// log writes explicitly in a separate system call, as necessary.
/// </summary>
@@ -1034,7 +1150,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB will automatically remove log files that are no
+ /// If true, Berkeley DB automatically removes log files that are no
/// longer needed.
/// </summary>
public bool LogAutoRemove {
@@ -1049,7 +1165,22 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, transaction logs are maintained in memory rather than on
+ /// If true, Berkeley DB avoids the fsync() call when the log files are
+ /// flushed.
+ /// </summary>
+ public bool LogNoSync {
+ get {
+ int onoff = 0;
+ dbenv.log_get_config(DbConstants.DB_LOG_NOSYNC, ref onoff);
+ return (onoff != 0);
+ }
+ set {
+ dbenv.log_set_config(
+ DbConstants.DB_LOG_NOSYNC, value ? 1 : 0);
+ }
+ }
+ /// <summary>
+ /// If true, transaction logs are maintained in-memory rather than on
/// disk. This means that transactions exhibit the ACI (atomicity,
/// consistency, and isolation) properties, but not D (durability).
/// </summary>
@@ -1120,7 +1251,7 @@ namespace BerkeleyDB {
/// group, and those members may be configured to store log records
/// on-disk.) When choosing log buffer and file sizes for in-memory
/// logs, applications should ensure the in-memory log buffer size is
- /// large enough that no transaction will ever span the entire buffer,
+ /// large enough that no transaction ever spans the entire buffer,
/// and avoid a state where the in-memory buffer is full and no space
/// can be freed because a transaction that started in the first log
/// "file" is still active.
@@ -1131,8 +1262,8 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If no size is specified by the application, the size last specified
- /// for the database region will be used, or if no database region
- /// previously existed, the default will be used.
+ /// for the database region is used, or if no database region
+ /// previously existed, the default is used.
/// </para>
/// </remarks>
public uint MaxLogFileSize {
@@ -1200,7 +1331,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// The number of file descriptors the library will open concurrently
+ /// The number of file descriptors the library opens concurrently
/// when flushing dirty pages from the cache.
/// </summary>
public int MaxOpenFiles {
@@ -1236,12 +1367,11 @@ namespace BerkeleyDB {
/// Transactions that update multiversion databases are not freed until
/// the last page version that the transaction created is flushed from
/// cache. This means that applications using multi-version concurrency
- /// control may need a transaction for each page in cache, in the
- /// extreme case.
+ /// control may need in the extreme case a transaction for each page in cache.
/// </para>
/// <para>
/// When all of the memory available in the database environment for
- /// transactions is in use, calls to <see cref="BeginTransaction"/> will
+ /// transactions is in use, calls to <see cref="BeginTransaction"/>
/// fail (until some active transactions complete). If MaxTransactions
/// is never set, the database environment is configured to support at
/// least 100 active transactions.
@@ -1305,6 +1435,18 @@ namespace BerkeleyDB {
}
}
/// <summary>
+ /// The message file.
+ /// </summary>
+ public string Msgfile {
+ set {
+ int ret = 0;
+ ret = dbenv.set_msgfile(value);
+ if(ret != 0) {
+ throw new Exception("Set message file fails.");
+ }
+ }
+ }
+ /// <summary>
/// The mutex alignment, in bytes.
/// </summary>
public uint MutexAlignment {
@@ -1345,7 +1487,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB will grant all requested mutual exclusion
+ /// If true, Berkeley DB grants all requested mutual exclusion
/// mutexes and database locks without regard for their actual
/// availability. This functionality should never be used for purposes
/// other than debugging.
@@ -1361,7 +1503,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB will copy read-only database files into the
+ /// If true, Berkeley DB copies read-only database files into the
/// local cache instead of potentially mapping them into process memory.
/// </summary>
/// <seealso cref="MMapSize"/>
@@ -1376,7 +1518,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB will ignore any panic state in the database
+ /// If true, Berkeley DB ignores any panic state in the database
/// environment. (Database environments in a panic state normally refuse
/// all attempts to call Berkeley DB functions, throwing
/// <see cref="RunRecoveryException"/>.) This functionality should never
@@ -1413,9 +1555,9 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// Berkeley DB overwrites files using alternating 0xff, 0x00 and 0xff
- /// byte patterns. For file overwriting to be effective, the underlying
+ /// byte patterns. For an effective overwrite, the underlying
/// file must be stored on a fixed-block filesystem. Systems with
- /// journaling or logging filesystems will require operating system
+ /// journaling or logging filesystems require operating system
/// support and probably modification of the Berkeley DB sources.
/// </remarks>
public bool Overwrite {
@@ -1429,6 +1571,19 @@ namespace BerkeleyDB {
}
}
/// <summary>
+ /// The function used to create a replication view that determines
+ /// whether a database file is replicated to the local site.
+ /// </summary>
+ /// <remarks>
+ /// If it is null, the replication view is a full view and all database
+ /// files are replicated to the local site. Otherwise it is a partial
+ /// view and only some database files are replicated to the local site.
+ /// </remarks>
+ public ReplicationViewDelegate ReplicationView {
+ get { return replicationViewHandler; }
+ private set { replicationViewHandler = value;}
+ }
+ /// <summary>
/// If true, allocate region memory from the heap instead of from memory
/// backed by the filesystem or system shared memory.
/// </summary>
@@ -1478,17 +1633,17 @@ namespace BerkeleyDB {
/// </summary>
/// <param name="GBytes">
/// The number of gigabytes to allocate for the main memory region.
- /// The gigabytes allocated will be added to the bytes input.
+ /// The gigabytes allocated are added to the bytes input.
/// </param>
/// <param name="Bytes">
/// The number of gigabytes to allocate for the main memory region.
- /// The bytes allocated will be added to the gigabytes input.
+ /// The bytes allocated are added to the gigabytes input.
/// </param>
public void RegionSetMemoryLimit(uint GBytes, uint Bytes) {
dbenv.set_memory_max(GBytes, Bytes);
}
/// <summary>
- /// If true, Berkeley DB will have checked to see if recovery needed to
+ /// If true, Berkeley DB checks if recovery is needed to
/// be performed before opening the database environment.
/// </summary>
public bool Register {
@@ -1523,16 +1678,14 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// The amount of time a master site will delay between completing a
+ /// The amount of time a master site delays between completing a
/// checkpoint and writing a checkpoint record into the log.
/// </summary>
/// <remarks>
/// This delay allows clients to complete their own checkpoints before
/// the master requires completion of them. The default is 30 seconds.
- /// If all databases in the environment, and the environment's
- /// transaction log, are configured to reside in memory (never preserved
- /// to disk), then, although checkpoints are still necessary, the delay
- /// is not useful and should be set to 0.
+ /// Delay should be set to 0 if all databases in the environment and the
+ /// environment's transaction log are configured to reside in-memory.
/// </remarks>
public uint RepCheckpointDelay {
get { return getRepTimeout(DbConstants.DB_REP_CHECKPOINT_DELAY); }
@@ -1602,7 +1755,7 @@ namespace BerkeleyDB {
dbenv.rep_set_clockskew(fast, slow);
}
/// <summary>
- /// The amount of time the replication manager will wait before trying
+ /// The amount of time the replication manager waits before trying
/// to re-establish a connection to another site after a communication
/// failure. The default wait time is 30 seconds.
/// </summary>
@@ -1615,7 +1768,7 @@ namespace BerkeleyDB {
}
/// <summary>
/// If true, the client should delay synchronizing to a newly declared
- /// master (defaults to false). Clients configured in this way will remain
+ /// master (defaults to false). Clients configured in this way remain
/// unsynchronized until the application calls <see cref="RepSync"/>.
/// </summary>
public bool RepDelayClientSync {
@@ -1626,7 +1779,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// Configure the amount of time the replication manager will wait
+ /// Configure the amount of time the replication manager waits
/// before retrying a failed election. The default wait time is 10
/// seconds.
/// </summary>
@@ -1681,7 +1834,7 @@ namespace BerkeleyDB {
/// <summary>
/// The frequency at which the replication manager, running at a master
/// site, broadcasts a heartbeat message in an otherwise idle system.
- /// When 0 (the default), no heartbeat messages will be sent.
+ /// When 0 (the default), no heartbeat messages are sent.
/// </summary>
public uint RepHeartbeatSend {
get { return getRepTimeout(DbConstants.DB_REP_HEARTBEAT_SEND); }
@@ -1739,7 +1892,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// Specify how master and client sites will handle acknowledgment of
+ /// Specify how master and client sites handle acknowledgment of
/// replication messages which are necessary for "permanent" records.
/// The current implementation requires all sites in a replication group
/// configure the same acknowledgement policy.
@@ -1754,6 +1907,30 @@ namespace BerkeleyDB {
set { dbenv.repmgr_set_ack_policy(value.Policy); }
}
/// <summary>
+ /// The gigabytes component of the maximum amount of dynamic memory
+ /// used by the Replication Manager incoming queue.
+ /// </summary>
+ public uint RepmgrIncomingQueueMaxGBytes {
+ get {
+ uint gb = 0;
+ uint b = 0;
+ dbenv.repmgr_get_incoming_queue_max(ref gb, ref b);
+ return gb;
+ }
+ }
+ /// <summary>
+ /// The bytes component of the maximum amount of dynamic memory
+ /// used by the Replication Manager incoming queue.
+ /// </summary>
+ public uint RepmgrIncomingQueueMaxBytes {
+ get {
+ uint gb = 0;
+ uint b = 0;
+ dbenv.repmgr_get_incoming_queue_max(ref gb, ref b);
+ return b;
+ }
+ }
+ /// <summary>
/// Create DbChannel with given eid.
/// </summary>
/// <param name="eid">
@@ -1767,8 +1944,7 @@ namespace BerkeleyDB {
}
/// <summary>
/// If true, Replication Manager automatically runs elections to
- /// choose a new master when the old master appears to
- /// have become disconnected (defaults to true).
+ /// choose a new master when the old master disconnects (defaults to true).
/// </summary>
public bool RepMgrRunElections {
get { return getRepConfig(DbConstants.DB_REPMGR_CONF_ELECTIONS); }
@@ -1800,7 +1976,7 @@ namespace BerkeleyDB {
get { return dbenv.repmgr_site_list(); }
}
/// <summary>
- /// If true, the replication master will automatically re-initialize
+ /// If true, the replication master automatically re-initializes
/// outdated clients (defaults to true).
/// </summary>
public bool RepAutoInit {
@@ -1811,9 +1987,9 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB method calls that would normally block while
- /// clients are in recovery will return errors immediately (defaults to
- /// false).
+ /// If true, errors are returned immediately for Berkeley DB method calls
+ /// that would normally block while clients are in recovery
+ /// (defaults to false).
/// </summary>
public bool RepNoBlocking {
get { return getRepConfig(DbConstants.DB_REP_CONF_NOWAIT); }
@@ -1893,17 +2069,16 @@ namespace BerkeleyDB {
/// maximum threshold of <paramref name="max"/> microseconds.
/// </para>
/// <para>
- /// These values are thresholds only. Since Berkeley DB has no thread
- /// available in the library as a timer, the threshold is only checked
+ /// These values are only thresholds. Since Berkeley DB has no thread
+ /// available as a timer in the library, the threshold is only checked
/// when a thread enters the Berkeley DB library to process an incoming
- /// replication message. Any amount of time may have passed since the
- /// last message arrived and Berkeley DB only checks whether the amount
+ /// replication message. Berkeley DB checks whether the amount
/// of time since a request was made is beyond the threshold value or
/// not.
/// </para>
/// <para>
- /// By default the minimum is 40000 and the maximum is 1280000 (1.28
- /// seconds). These defaults are fairly arbitrary and the application
+ /// By default the minimum is 40000 and the maximum is 1280000 microseconds
+ /// (1.28 seconds). These defaults are fairly arbitrary and the application
/// likely needs to adjust these. The values should be based on expected
/// load and performance characteristics of the master and client host
/// platforms and transport infrastructure as well as round-trip message
@@ -1922,8 +2097,8 @@ namespace BerkeleyDB {
}
/// <summary>
/// Replication Manager observes the strict "majority" rule in managing
- /// elections, even in a group with only 2 sites. This means the client
- /// in a 2-site group will be unable to take over as master if the
+ /// elections, even in a group with only 2 sites. The client
+ /// in a 2-site group is unable to take over as master if the
/// original master fails or becomes disconnected. (See the Elections
/// section in the Berkeley DB Reference Guide for more information.)
/// Both sites in the replication group should have the same value for
@@ -1939,8 +2114,39 @@ namespace BerkeleyDB {
}
}
/// <summary>
+ /// This flag is used to specify the preferred master site in a
+ /// replication group operating in preferred master mode. A preferred
+ /// master replication group must contain only two sites, with one site
+ /// specified as the preferred master site and the other site specified
+ /// as the client site. The preferred master site operates as the
+ /// master site whenever possible.
+ /// </summary>
+ public bool RepPrefmasMaster {
+ get { return getRepConfig(DbConstants.DB_REPMGR_CONF_PREFMAS_MASTER); }
+ set {
+ dbenv.rep_set_config(
+ DbConstants.DB_REPMGR_CONF_PREFMAS_MASTER, value ? 1 : 0);
+ }
+ }
+ /// <summary>
+ /// This flag is used to specify the client site in a replication group
+ /// operating in preferred master mode. A preferred master replication
+ /// group must contain only two sites, with one site specified as the
+ /// preferred master site and the other site specified as the client
+ /// site. The client site in a preferred master replication group takes
+ /// over temporarily as master when the preferred master site is
+ /// unavailable.
+ /// </summary>
+ public bool RepPrefmasClient {
+ get { return getRepConfig(DbConstants.DB_REPMGR_CONF_PREFMAS_CLIENT); }
+ set {
+ dbenv.rep_set_config(
+ DbConstants.DB_REPMGR_CONF_PREFMAS_CLIENT, value ? 1 : 0);
+ }
+ }
+ /// <summary>
/// The gigabytes component of the byte-count limit on the amount of
- /// data that will be transmitted from a site in response to a single
+ /// data that is transmitted from a site in response to a single
/// message processed by <see cref="RepProcessMessage"/>.
/// </summary>
public uint RepTransmitLimitGBytes {
@@ -1953,7 +2159,7 @@ namespace BerkeleyDB {
}
/// <summary>
/// The bytes component of the byte-count limit on the amount of data
- /// that will be transmitted from a site in response to a single
+ /// that is transmitted from a site in response to a single
/// message processed by <see cref="RepProcessMessage"/>.
/// </summary>
public uint RepTransmitLimitBytes {
@@ -1965,7 +2171,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// Set a byte-count limit on the amount of data that will be
+ /// Set a byte-count limit on the amount of data that is
/// transmitted from a site in response to a single message processed by
/// <see cref="RepProcessMessage"/>. The limit is not a hard limit, and
/// the record that exceeds the limit is the last record to be sent.
@@ -1983,18 +2189,46 @@ namespace BerkeleyDB {
/// <param name="GBytes">
/// The number of gigabytes which, when added to
/// <paramref name="Bytes"/>, specifies the maximum number of bytes that
- /// will be sent in a single call to <see cref="RepProcessMessage"/>.
+ /// are sent in a single call to <see cref="RepProcessMessage"/>.
/// </param>
/// <param name="Bytes">
/// The number of bytes which, when added to
/// <paramref name="GBytes"/>, specifies the maximum number of bytes
- /// that will be sent in a single call to
+ /// that are sent in a single call to
/// <see cref="RepProcessMessage"/>.
/// </param>
public void RepSetTransmitLimit(uint GBytes, uint Bytes) {
dbenv.rep_set_limit(GBytes, Bytes);
}
/// <summary>
+ /// Set a byte-count limit on the maximum amount of dynamic memory
+ /// used by the Replication Manager incoming queue.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// By default, the Replication Manager incoming queue size has a
+ /// limit of 100MB.
+ /// </para>
+ /// <para>
+ /// If both <paramref name="GBytes"/> and <paramref name="Bytes"/> are
+ /// zero, then the Replication Manager incoming queue size is limited
+ /// by available heap memory.
+ /// </para>
+ /// </remarks>
+ /// <param name="GBytes">
+ /// The number of gigabytes which, when added to
+ /// <paramref name="Bytes"/>, specifies the maximum amount of dynamic
+ /// memory used by the Replication Manager incoming queue.
+ /// </param>
+ /// <param name="Bytes">
+ /// The number of bytes which, when added to
+ /// <paramref name="GBytes"/>, specifies the maximum amount of dynamic
+ /// memory used by the Replication Manager incoming queue.
+ /// </param>
+ public void RepmgrSetIncomingQueueMax(uint GBytes, uint Bytes) {
+ dbenv.repmgr_set_incoming_queue_max(GBytes, Bytes);
+ }
+ /// <summary>
/// The delegate used to transmit data using the replication
/// application's communication infrastructure.
/// </summary>
@@ -2034,7 +2268,7 @@ namespace BerkeleyDB {
transportHandler = transport;
}
/// <summary>
- /// If true, master leases will be used for this site (defaults to
+ /// If true, master leases are used for this site (defaults to
/// false).
/// </summary>
/// <remarks>
@@ -2072,7 +2306,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// The number of microseconds the thread of control will pause before
+ /// The number of microseconds the thread of control pauses before
/// scheduling further write operations.
/// </summary>
public uint SequentialWritePause {
@@ -2135,12 +2369,12 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// The path of a directory to be used as the location of temporary
+ /// The path of a directory to be used as the location for temporary
/// files.
/// </summary>
/// <remarks>
/// <para>
- /// The files created to back in-memory access method databases will be
+ /// The files created to back in-memory access method databases are
/// created relative to this path. These temporary files can be quite
/// large, depending on the size of the database.
/// </para>
@@ -2205,13 +2439,12 @@ namespace BerkeleyDB {
}
/// <summary>
/// If true, database calls timing out based on lock or transaction
- /// timeout values will throw <see cref="LockNotGrantedException"/>
+ /// timeout values throw <see cref="LockNotGrantedException"/>
/// instead of <see cref="DeadlockException"/>.
/// </summary>
/// <remarks>
- /// If true, this allows applications to distinguish between operations
- /// which have deadlocked and operations which have exceeded their time
- /// limits.
+ /// If true, allows applications to distinguish between deadlocked operations
+ /// and operations that have exceeded their time limits.
/// </remarks>
public bool TimeNotGranted {
get {
@@ -2224,13 +2457,13 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB will not write or synchronously flush the log
+ /// If true, Berkeley DB does not write or synchronously flush the log
/// on transaction commit.
/// </summary>
/// <remarks>
/// This means that transactions exhibit the ACI (atomicity,
- /// consistency, and isolation) properties, but not D (durability); that
- /// is, database integrity will be maintained, but if the application or
+ /// consistency, and isolation) properties, but not D (durability);
+ /// database integrity is maintained, but if the application or
/// system fails, it is possible some number of the most recently
/// committed transactions may be undone during recovery. The number of
/// transactions at risk is governed by how many log updates can fit
@@ -2261,10 +2494,10 @@ namespace BerkeleyDB {
set { dbenv.set_flags(DbConstants.DB_TXN_NOWAIT, value ? 1 : 0); }
}
/// <summary>
- /// If true, all transactions in the environment will be started as if
+ /// If true, all transactions in the environment are started as if
/// <see cref="TransactionConfig.Snapshot"/> was passed to
/// <see cref="BeginTransaction"/>, and all non-transactional cursors
- /// will be opened as if <see cref="CursorConfig.SnapshotIsolation"/>
+ /// are opened as if <see cref="CursorConfig.SnapshotIsolation"/>
/// was passed to <see cref="BaseDatabase.Cursor"/>.
/// </summary>
public bool TxnSnapshot {
@@ -2281,10 +2514,8 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// All timeouts are checked whenever a thread of control blocks on a
- /// lock or when deadlock detection is performed. As timeouts are only
- /// checked when the lock request first blocks or when deadlock
- /// detection is performed, the accuracy of the timeout depends on how
- /// often deadlock detection is performed.
+ /// lock or when deadlock detection is performed. The accuracy of the
+ /// timeout depends on how often deadlock detection is performed.
/// </para>
/// <para>
/// Timeout values specified for the database environment may be
@@ -2322,15 +2553,15 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB will write, but will not synchronously flush,
+ /// If true, Berkeley DB writes, but does not synchronously flush,
/// the log on transaction commit.
/// </summary>
/// <remarks>
/// This means that transactions exhibit the ACI (atomicity,
- /// consistency, and isolation) properties, but not D (durability); that
- /// is, database integrity will be maintained, but if the system fails,
- /// it is possible some number of the most recently committed
- /// transactions may be undone during recovery. The number of
+ /// consistency, and isolation) properties, but not D (durability); database
+ /// integrity is maintained, but if the application or
+ /// system fails, it is possible that some number of the most recently
+ /// committed transactions may be undone during recovery. The number of
/// transactions at risk is governed by how often the system flushes
/// dirty buffers to disk and how often the log is checkpointed.
/// </remarks>
@@ -2345,11 +2576,11 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, all databases in the environment will be opened as if
+ /// If true, all databases in the environment are opened as if
/// <see cref="DatabaseConfig.UseMVCC"/> was set.
/// </summary>
/// <remarks>
- /// This flag will be ignored for queue databases for which MVCC is not
+ /// This flag is ignored for queue databases for which MVCC is not
/// supported.
/// </remarks>
public bool UseMVCC {
@@ -2439,7 +2670,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, Berkeley DB will yield the processor immediately after each
+ /// If true, Berkeley DB yields the processor immediately after each
/// page or mutex acquisition.
/// </summary>
/// <remarks>
@@ -2489,7 +2720,7 @@ namespace BerkeleyDB {
/// <para>
/// If there are processes that have called <see cref="Open"/> without
/// calling <see cref="Close"/> (that is, there are processes currently
- /// using the environment), Remove will fail without further action.
+ /// using the environment), Remove fails without further action.
/// </para>
/// <para>
/// Calling Remove should not be necessary for most applications because
@@ -2530,13 +2761,12 @@ namespace BerkeleyDB {
/// The result of attempting to forcibly destroy the environment when it
/// is in use is unspecified. Processes using an environment often
/// maintain open file descriptors for shared regions within it. On UNIX
- /// systems, the environment removal will usually succeed, and processes
- /// that have already joined the region will continue to run in that
+ /// systems, the environment removal usually succeeds, and processes
+ /// that have already joined the region continue to run in that
/// region without change. However, processes attempting to join the
- /// environment will either fail or create new regions. On other systems
- /// in which the unlink(2) system call will fail if any process has an
- /// open file descriptor for the file (for example Windows/NT), the
- /// region removal will fail.
+ /// environment either fail or create new regions. On non-UNIX systems,
+ /// region removal is not possible because the unlink(2) system call fails
+ /// if any process has an open file descriptor for the file.
/// </para>
/// </remarks>
/// <param name="db_home">
@@ -2572,7 +2802,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// By default, data directories and the log directory specified
- /// relative to the home directory will be recreated relative to the
+ /// relative to the home directory are recreated relative to the
/// target directory. If absolute path names are used, then use the
/// <see cref="BackupOptions.SingleDir"/> method.
/// </para>
@@ -2601,15 +2831,15 @@ namespace BerkeleyDB {
/// </para>
/// </summary>
/// <param name="target">Identifies the directory in which the back up
- /// will be placed. Any subdirectories required to contain the back up
- /// must be placed relative to this directory. Note that if an
+ /// is placed. Any subdirectories required to contain the back up
+ /// must be placed relative to this directory. If an
/// <see cref="IBackup"/> is configured for the environment, then the
/// value specified to this parameter is passed on to the
/// <see cref="IBackup.Open"/> method. If this parameter is null, then
/// the target must be specified to the <see cref="IBackup.Open"/>
/// method.
/// <para>
- /// This directory, and any required subdirectories, will be created for
+ /// This directory, and any required subdirectories, are created for
/// you if you specify <see cref="CreatePolicy.IF_NEEDED"/> or
/// <see cref="CreatePolicy.ALWAYS"/> for the
/// <see cref="BackupOptions.Creation"/> property.
@@ -2638,7 +2868,7 @@ namespace BerkeleyDB {
/// </para>
/// </summary>
/// <param name="target">Identifies the directory in which the back up
- /// will be placed.</param>
+ /// is placed.</param>
/// <param name="database">The database file that you want to back up.
/// </param>
/// <param name="must_create">If true, then if the target file exists,
@@ -2661,7 +2891,7 @@ namespace BerkeleyDB {
/// <param name="nsites">
/// The number of replication sites expected to participate in the
/// election. Once the current site has election information from that
- /// many sites, it will short-circuit the election and immediately cast
+ /// many sites, it short-circuits the election and immediately casts
/// its vote for a new master. If an application is using master leases,
/// then the value must be 0 and <see cref="RepNSites"/> must be used.
/// </param>
@@ -2680,7 +2910,7 @@ namespace BerkeleyDB {
/// framework.
/// </para>
/// <para>
- /// If the election is successful, Berkeley DB will notify the
+ /// If the election is successful, Berkeley DB notifies the
/// application of the results of the election by means of either the
/// <see cref="NotificationEvent.REP_ELECTED"/> or
/// <see cref="NotificationEvent.REP_NEWMASTER"/> events (see
@@ -2703,7 +2933,7 @@ namespace BerkeleyDB {
/// <param name="nsites">
/// The number of replication sites expected to participate in the
/// election. Once the current site has election information from that
- /// many sites, it will short-circuit the election and immediately cast
+ /// many sites, it short-circuits the election and immediately casts
/// its vote for a new master. This parameter must be no less than
/// <paramref name="nvotes"/>, or 0 if the election should use
/// <see cref="RepNSites"/>. If an application is using master leases,
@@ -2711,7 +2941,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="nvotes">
/// The minimum number of replication sites from which the current site
- /// must have election information, before the current site will cast a
+ /// must have election information, before the current site casts a
/// vote for a new master. This parameter must be no greater than
/// <paramref name="nsites"/>, or 0 if the election should use the value
/// ((<paramref name="nsites"/> / 2) + 1).
@@ -3081,8 +3311,8 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If an application has configured delayed master synchronization, the
- /// application must synchronize explicitly (otherwise the client will
- /// remain out-of-date and will ignore all database changes forwarded
+ /// application must synchronize explicitly (otherwise the client
+ /// remains out-of-date and ignores database changes forwarded
/// from the replication group master). RepSync may be called any time
/// after the client application learns that the new master has been
/// established (by receiving
@@ -3120,9 +3350,9 @@ namespace BerkeleyDB {
/// file in which transactions are being logged or aborted.)
/// </para>
/// <para>
- /// When Replication Manager is in use, log archiving will be performed
+ /// When Replication Manager is in use, log archiving is performed
/// in a replication group-aware manner such that the log file status of
- /// other sites in the group will be considered to determine if a log
+ /// other sites in the group are examined to determine if a log
/// file could be in use.
/// </para>
/// <para>
@@ -3144,17 +3374,17 @@ namespace BerkeleyDB {
}
/// <summary>
/// The database files that need to be archived in order to recover the
- /// database from catastrophic failure. If any of the database files
- /// have not been accessed during the lifetime of the current log files,
- /// they will not included in this list. It is also possible that some
+ /// database from catastrophic failure. Database files that have not been
+ /// accessed during the lifetime of the current log files
+ /// are not included in this list. It is also possible that some
/// of the files referred to by the log have since been deleted from the
/// system.
/// </summary>
/// <remarks>
/// <para>
- /// When Replication Manager is in use, log archiving will be performed
+ /// When Replication Manager is in use, log archiving is performed
/// in a replication group-aware manner such that the log file status of
- /// other sites in the group will be considered to determine if a log
+ /// other sites in the group are examined to determine if a log
/// file could be in use.
/// </para>
/// <para>
@@ -3217,9 +3447,9 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// When Replication Manager is in use, log archiving will be performed
+ /// When Replication Manager is in use, log archiving is performed
/// in a replication group-aware manner such that the log file status of
- /// other sites in the group will be considered to determine if a log
+ /// other sites in the group are examined to determine if a log
/// file could be in use.
/// </para>
/// </remarks>
@@ -3233,7 +3463,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// Calling <see cref="Transaction.Commit"/> will discard the allocated
+ /// Calling <see cref="Transaction.Commit"/> discards the allocated
/// locker ID.
/// </para>
/// <para>
@@ -3280,7 +3510,7 @@ namespace BerkeleyDB {
/// The configuration properties for the transaction
/// </param>
/// <param name="parent">
- /// If the non-null, the new transaction will be a nested transaction,
+ /// If non-null, the new transaction is a nested transaction,
/// with <paramref name="parent"/> as the new transaction's parent.
/// Transactions may be nested to any level.
/// </param>
@@ -3314,11 +3544,11 @@ namespace BerkeleyDB {
/// checkpoint record to the log, and then flush the log.
/// </summary>
/// <param name="kbytesWritten">
- /// A checkpoint will be done if more than kbytesWritten kilobytes of
+ /// A checkpoint is performed if more than kbytesWritten kilobytes of
/// log data have been written since the last checkpoint.
/// </param>
/// <param name="minutesElapsed">
- /// A checkpoint will be done if more than minutesElapsed minutes have
+ /// A checkpoint is performed if more than minutesElapsed minutes have
/// passed since the last checkpoint.
/// </param>
public void Checkpoint(uint kbytesWritten, uint minutesElapsed) {
@@ -3349,8 +3579,8 @@ namespace BerkeleyDB {
/// with depending on this semantic is that aborting an unresolved
/// transaction involving database operations requires a database
/// handle. Because the database handles should have been closed before
- /// calling CloseForceSync, it will not be possible to abort the
- /// transaction, and recovery will have to be run on the Berkeley DB
+ /// calling CloseForceSync, it is not possible to abort the
+ /// transaction, and recovery should be run on the Berkeley DB
/// environment before further operations are done.
/// </para>
/// <para>
@@ -3372,9 +3602,9 @@ namespace BerkeleyDB {
/// to it is not yet closed; for example, database environment handles
/// must not be closed while transactions in the environment have
/// not yet been committed or aborted. If there are open database
- /// handles, they are all closed, and each of them will be synced on
+ /// handles, they are all closed, and each of them is synced on
/// close. The first error in the close operations, if any, is
- /// returned at last, and the environment close procedures will
+ /// returned at last, and the environment close procedures
/// carry on anyway.
/// </para>
/// <para>
@@ -3386,8 +3616,8 @@ namespace BerkeleyDB {
/// with depending on this semantic is that aborting an unresolved
/// transaction involving database operations requires a database
/// handle. Because the database handles should have been closed before
- /// calling CloseForceSync, it will not be possible to abort the
- /// transaction, and recovery will have to be run on the Berkeley DB
+ /// calling CloseForceSync, it is not possible to abort the
+ /// transaction, and recovery should be run on the Berkeley DB
/// environment before further operations are done.
/// </para>
/// <para>
@@ -3395,9 +3625,43 @@ namespace BerkeleyDB {
/// CloseForceSync.
/// </para>
/// </remarks>
- public void CloseForceSync() {
- dbenv.close(DbConstants.DB_FORCESYNC);
- }
+ public void CloseForceSync() {
+ dbenv.close(DbConstants.DB_FORCESYNC);
+ }
+
+ /// <summary>
+ /// Close the Berkeley DB environment, freeing any allocated resources,
+ /// closing any open databases as well as underlying subsystems.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// The object should not be closed while any other handle that refers
+ /// to it is not yet closed; for example, database environment handles
+ /// must not be closed while transactions in the environment have
+ /// not yet been committed or aborted. Calling CloseForceSyncEnv flushes
+ /// all memory mapped environment regions before closing the environment.
+ /// </para>
+ /// </remarks>
+ public void CloseForceSyncEnv() {
+ dbenv.close(DbConstants.DB_FORCESYNCENV);
+ }
+
+ /// <summary>
+ /// Close the Berkeley DB environment, freeing any allocated resources,
+ /// closing any open databases as well as underlying subsystems.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// The object should not be closed while any other handle that refers
+ /// to it is not yet closed; for example, database environment handles
+ /// must not be closed while transactions in the environment have
+ /// not yet been committed or aborted. Calling CloseForceSyncAndForceSyncEnv
+ /// has the effect of both CloseForceSync and CloseForceSyncEnv. See
+ /// CloseForceSync and CloseForceSyncEnv documentation for more details.
+ /// </remarks>
+ public void CloseForceSyncAndForceSyncEnv() {
+ dbenv.close(DbConstants.DB_FORCESYNC | DbConstants.DB_FORCESYNCENV);
+ }
/// <summary>
/// Run one iteration of the deadlock detector. The deadlock detector
@@ -3435,14 +3699,14 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If FailCheck determines a thread of control exited while holding
- /// database read locks, it will release those locks. If FailCheck
+ /// database read locks, it releases those locks. If FailCheck
/// determines a thread of control exited with an unresolved
- /// transaction, the transaction will be aborted. In either of these
- /// cases, FailCheck will return successfully and the application may
+ /// transaction, the transaction aborts. In either of these
+ /// cases, FailCheck returns successfully and the application may
/// continue to use the database environment.
/// </para>
/// <para>
- /// In either of these cases, FailCheck will also report the process and
+ /// In either of these cases, FailCheck also reports the process and
/// thread IDs associated with any released locks or aborted
/// transactions. The information is printed to a specified output
/// channel (see <see cref="Verbosity"/> for more information), or
@@ -3451,7 +3715,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If FailCheck determines a thread of control has exited such that
- /// database environment recovery is required, it will throw
+ /// database environment recovery is required, it throws
/// <see cref="RunRecoveryException"/>. In this case, the application
/// should not continue to use the database environment. For a further
/// description as to the actions the application should take when this
@@ -3483,11 +3747,11 @@ namespace BerkeleyDB {
/// <returns>
/// This method returns TransactionAppliedStatus.APPLIED to indicate that the specified
/// transaction has indeed been applied at the local site. TransactionAppliedStatus.TIMEOUT
- /// will be returned if the specified transaction has not yet arrived at the calling site,
- /// but can be expected to arrive soon. TransactionAppliedStatus.NOTFOUND will be returned
+ /// returns if the specified transaction has not yet arrived at the calling site,
+ /// but can be expected to arrive soon. TransactionAppliedStatus.NOTFOUND is returned
/// if the transaction has not been applied at the local site, and it can be determined that
/// the transaction has been rolled back due to a master takeover, and is therefore never
- /// expected to arrive. TransactionAppliedStatus.EMPTY_TRANSACTION will be return if the specified
+ /// expected to arrive. TransactionAppliedStatus.EMPTY_TRANSACTION returns if the specified
/// token was generated by a transaction that did not modify the database environment
/// (e.g., a read-only transaction).
/// </returns>
@@ -3651,8 +3915,8 @@ namespace BerkeleyDB {
/// <param name="file">The physical file to be removed.</param>
/// <param name="autoCommit">
/// If true, enclose RemoveDB within a transaction. If the call
- /// succeeds, changes made by the operation will be recoverable. If the
- /// call fails, the operation will have made no changes.
+ /// succeeds, changes made by the operation are recoverable. If the
+ /// call fails, the operation has made no changes.
/// </param>
public void RemoveDB(string file, bool autoCommit) {
RemoveDB(file, null, autoCommit, null);
@@ -3669,8 +3933,8 @@ namespace BerkeleyDB {
/// <param name="database">The database to be removed.</param>
/// <param name="autoCommit">
/// If true, enclose RemoveDB within a transaction. If the call
- /// succeeds, changes made by the operation will be recoverable. If the
- /// call fails, the operation will have made no changes.
+ /// succeeds, changes made by the operation are recoverable. If the
+ /// call fails, the operation has made no changes.
/// </param>
public void RemoveDB(string file, string database, bool autoCommit) {
RemoveDB(file, database, autoCommit, null);
@@ -3682,8 +3946,8 @@ namespace BerkeleyDB {
/// <param name="file">The physical file to be removed.</param>
/// <param name="autoCommit">
/// If true, enclose RemoveDB within a transaction. If the call
- /// succeeds, changes made by the operation will be recoverable. If the
- /// call fails, the operation will have made no changes.
+ /// succeeds, changes made by the operation are recoverable. If the
+ /// call fails, the operation has made no changes.
/// </param>
/// <param name="txn">
/// If the operation is part of an application-specified transaction,
@@ -3693,7 +3957,7 @@ namespace BerkeleyDB {
/// <paramref name="txn"/> is a handle returned from
/// <see cref="DatabaseEnvironment.BeginCDSGroup"/>; otherwise null. If
/// null, but <paramref name="autoCommit"/> or <see cref="AutoCommit"/>
- /// is true, the operation will be implicitly transaction protected.
+ /// is true, the operation is implicitly transaction protected.
/// </param>
public void RemoveDB(string file, bool autoCommit, Transaction txn) {
RemoveDB(file, null, autoCommit, txn);
@@ -3710,8 +3974,8 @@ namespace BerkeleyDB {
/// <param name="database">The database to be removed.</param>
/// <param name="autoCommit">
/// If true, enclose RemoveDB within a transaction. If the call
- /// succeeds, changes made by the operation will be recoverable. If the
- /// call fails, the operation will have made no changes.
+ /// succeeds, changes made by the operation are recoverable. If the
+ /// call fails, the operation has made no changes.
/// </param>
/// <param name="txn">
/// If the operation is part of an application-specified transaction,
@@ -3721,7 +3985,7 @@ namespace BerkeleyDB {
/// <paramref name="txn"/> is a handle returned from
/// <see cref="DatabaseEnvironment.BeginCDSGroup"/>; otherwise null. If
/// null, but <paramref name="autoCommit"/> or <see cref="AutoCommit"/>
- /// is true, the operation will be implicitly transaction protected.
+ /// is true, the operation is implicitly transaction protected.
/// </param>
public void RemoveDB(
string file, string database, bool autoCommit, Transaction txn) {
@@ -3738,8 +4002,8 @@ namespace BerkeleyDB {
/// <param name="newname">The new name of the database or file.</param>
/// <param name="autoCommit">
/// If true, enclose RenameDB within a transaction. If the call
- /// succeeds, changes made by the operation will be recoverable. If the
- /// call fails, the operation will have made no changes.
+ /// succeeds, changes made by the operation are recoverable. If the
+ /// call fails, the operation has made no changes.
/// </param>
public void RenameDB(string file, string newname, bool autoCommit) {
RenameDB(file, null, newname, autoCommit, null);
@@ -3759,8 +4023,8 @@ namespace BerkeleyDB {
/// <param name="newname">The new name of the database or file.</param>
/// <param name="autoCommit">
/// If true, enclose RenameDB within a transaction. If the call
- /// succeeds, changes made by the operation will be recoverable. If the
- /// call fails, the operation will have made no changes.
+ /// succeeds, changes made by the operation are recoverable. If the
+ /// call fails, the operation has made no changes.
/// </param>
public void RenameDB(
string file, string database, string newname, bool autoCommit) {
@@ -3775,8 +4039,8 @@ namespace BerkeleyDB {
/// <param name="newname">The new name of the database or file.</param>
/// <param name="autoCommit">
/// If true, enclose RenameDB within a transaction. If the call
- /// succeeds, changes made by the operation will be recoverable. If the
- /// call fails, the operation will have made no changes.
+ /// succeeds, changes made by the operation are recoverable. If the
+ /// call fails, the operation has made no changes.
/// </param>
/// <param name="txn">
/// If the operation is part of an application-specified transaction,
@@ -3786,7 +4050,7 @@ namespace BerkeleyDB {
/// <paramref name="txn"/> is a handle returned from
/// <see cref="DatabaseEnvironment.BeginCDSGroup"/>; otherwise null. If
/// null, but <paramref name="autoCommit"/> or <see cref="AutoCommit"/>
- /// is true, the operation will be implicitly transaction protected.
+ /// is true, the operation is implicitly transaction protected.
/// </param>
public void RenameDB(string file,
string newname, bool autoCommit, Transaction txn) {
@@ -3807,8 +4071,8 @@ namespace BerkeleyDB {
/// <param name="newname">The new name of the database or file.</param>
/// <param name="autoCommit">
/// If true, enclose RenameDB within a transaction. If the call
- /// succeeds, changes made by the operation will be recoverable. If the
- /// call fails, the operation will have made no changes.
+ /// succeeds, changes made by the operation are recoverable. If the
+ /// call fails, the operation has made no changes.
/// </param>
/// <param name="txn">
/// If the operation is part of an application-specified transaction,
@@ -3818,7 +4082,7 @@ namespace BerkeleyDB {
/// <paramref name="txn"/> is a handle returned from
/// <see cref="DatabaseEnvironment.BeginCDSGroup"/>; otherwise null. If
/// null, but <paramref name="autoCommit"/> or <see cref="AutoCommit"/>
- /// is true, the operation will be implicitly transaction protected.
+ /// is true, the operation is implicitly transaction protected.
/// </param>
public void RenameDB(string file,
string database, string newname, bool autoCommit, Transaction txn) {
@@ -3827,8 +4091,8 @@ namespace BerkeleyDB {
}
/// <summary>
- /// Allow database files to be copied, and then the copy used in the
- /// same database environment as the original.
+ /// Allow database files to be copied and used in the same database
+ /// environment as the original.
/// </summary>
/// <remarks>
/// <para>
@@ -3847,7 +4111,7 @@ namespace BerkeleyDB {
/// The name of the physical file in which new file IDs are to be created.
/// </param>
/// <param name="encrypted">
- /// If true, he file contains encrypted databases.
+ /// If true, the file contains encrypted databases.
/// </param>
public void ResetFileID(string file, bool encrypted) {
dbenv.fileid_reset(file, encrypted ? DbConstants.DB_ENCRYPT : 0);
@@ -3866,7 +4130,7 @@ namespace BerkeleyDB {
/// result in data corruption if the LSNs are not first cleared.
/// </para>
/// <para>
- /// Note that LSNs should be reset before moving or copying the database
+ /// LSNs should be reset before moving or copying the database
/// file into a new database environment, rather than moving or copying
/// the database file and then resetting the LSNs. Berkeley DB has
/// consistency checks that may be triggered if an application calls
@@ -4136,29 +4400,30 @@ namespace BerkeleyDB {
/// by <see cref="LockStats"/>.
/// </summary>
public void PrintLockingSystemStats() {
- PrintLockingSystemStats(false, false, false, false, false, false);
+ PrintLockingSystemStats
+ (false, false, false, false, false, false, false);
}
/// <summary>
/// Display the locking subsystem statistical information, as described
/// by <see cref="LockStats"/>.
/// </summary>
/// <param name="PrintAll">
- /// If true, display all available information.
- /// </param>
+ /// If true, display all available information.
+ /// </param>
/// <param name="ClearStats">
/// If true, reset statistics after displaying their values.
/// </param>
public void PrintLockingSystemStats(bool PrintAll, bool ClearStats) {
PrintLockingSystemStats(
- PrintAll, ClearStats, false, false, false, false);
+ PrintAll, ClearStats, false, false, false, false, false);
}
/// <summary>
/// Display the locking subsystem statistical information, as described
/// by <see cref="LockStats"/>.
/// </summary>
/// <param name="PrintAll">
- /// If true, display all available information.
- /// </param>
+ /// If true, display all available information.
+ /// </param>
/// <param name="ClearStats">
/// If true, reset statistics after displaying their values.
/// </param>
@@ -4166,7 +4431,7 @@ namespace BerkeleyDB {
/// If true, display the lock conflict matrix.
/// </param>
/// <param name="Lockers">
- /// If true, Display the lockers within hash chains.
+ /// If true, display the lockers within hash chains.
/// </param>
/// <param name="Objects">
/// If true, display the lock objects within hash chains.
@@ -4176,6 +4441,37 @@ namespace BerkeleyDB {
/// </param>
public void PrintLockingSystemStats(bool PrintAll, bool ClearStats,
bool ConflictMatrix, bool Lockers, bool Objects, bool Parameters) {
+ PrintLockingSystemStats(PrintAll, ClearStats, ConflictMatrix,
+ Lockers, Objects, Parameters, false);
+ }
+ /// <summary>
+ /// Display the locking subsystem statistical information, as described
+ /// by <see cref="LockStats"/>.
+ /// </summary>
+ /// <param name="PrintAll">
+ /// If true, display all available information.
+ /// </param>
+ /// <param name="ClearStats">
+ /// If true, reset statistics after displaying their values.
+ /// </param>
+ /// <param name="ConflictMatrix">
+ /// If true, display the lock conflict matrix.
+ /// </param>
+ /// <param name="Lockers">
+ /// If true, display the lockers within hash chains.
+ /// </param>
+ /// <param name="Objects">
+ /// If true, display the lock objects within hash chains.
+ /// </param>
+ /// <param name="Parameters">
+ /// If true, display the locking subsystem parameters.
+ /// </param>
+ /// <param name="PrintAlloc">
+ /// If true, display allocation information.
+ /// </param>
+ public void PrintLockingSystemStats(bool PrintAll, bool ClearStats,
+ bool ConflictMatrix, bool Lockers, bool Objects, bool Parameters,
+ bool PrintAlloc) {
uint flags = 0;
flags |= PrintAll ? DbConstants.DB_STAT_ALL : 0;
flags |= ClearStats ? DbConstants.DB_STAT_CLEAR : 0;
@@ -4183,6 +4479,7 @@ namespace BerkeleyDB {
flags |= Lockers ? DbConstants.DB_STAT_LOCK_LOCKERS : 0;
flags |= Objects ? DbConstants.DB_STAT_LOCK_OBJECTS : 0;
flags |= Parameters ? DbConstants.DB_STAT_LOCK_PARAMS : 0;
+ flags |= PrintAlloc ? DbConstants.DB_STAT_ALLOC : 0;
dbenv.lock_stat_print(flags);
}
@@ -4192,48 +4489,66 @@ namespace BerkeleyDB {
/// by <see cref="LogStats"/>.
/// </summary>
public void PrintLoggingSystemStats() {
- PrintLoggingSystemStats(false, false);
+ PrintLoggingSystemStats(false, false, false);
}
/// <summary>
/// Display the logging subsystem statistical information, as described
/// by <see cref="LogStats"/>.
/// </summary>
/// <param name="PrintAll">
- /// If true, display all available information.
- /// </param>
+ /// If true, display all available information.
+ /// </param>
/// <param name="ClearStats">
/// If true, reset statistics after displaying their values.
/// </param>
public void PrintLoggingSystemStats(bool PrintAll, bool ClearStats) {
+ PrintLoggingSystemStats(PrintAll, ClearStats, false);
+ }
+ /// <summary>
+ /// Display the logging subsystem statistical information, as described
+ /// by <see cref="LogStats"/>.
+ /// </summary>
+ /// <param name="PrintAll">
+ /// If true, display all available information.
+ /// </param>
+ /// <param name="ClearStats">
+ /// If true, reset statistics after displaying their values.
+ /// </param>
+ /// <param name="PrintAlloc">
+ /// If true, display allocation information.
+ /// </param>
+ public void PrintLoggingSystemStats(bool PrintAll, bool ClearStats,
+ bool PrintAlloc) {
uint flags = 0;
flags |= PrintAll ? DbConstants.DB_STAT_ALL : 0;
flags |= ClearStats ? DbConstants.DB_STAT_CLEAR : 0;
+ flags |= PrintAlloc ? DbConstants.DB_STAT_ALLOC : 0;
dbenv.log_stat_print(flags);
}
/// <summary>
- /// Display the memory pool (that is, buffer cache) subsystem
+ /// Display the memory pool (buffer cache) subsystem
/// statistical information, as described by <see cref="MPoolStats"/>.
/// </summary>
public void PrintMPoolSystemStats() {
- PrintMPoolSystemStats(false, false, false);
+ PrintMPoolSystemStats(false, false, false, false);
}
/// <summary>
- /// Display the memory pool (that is, buffer cache) subsystem
+ /// Display the memory pool (buffer cache) subsystem
/// statistical information, as described by <see cref="MPoolStats"/>.
/// </summary>
/// <param name="PrintAll">
- /// If true, display all available information.
- /// </param>
+ /// If true, display all available information.
+ /// </param>
/// <param name="ClearStats">
/// If true, reset statistics after displaying their values.
/// </param>
public void PrintMPoolSystemStats(bool PrintAll, bool ClearStats) {
- PrintMPoolSystemStats(PrintAll, ClearStats, false);
+ PrintMPoolSystemStats(PrintAll, ClearStats, false, false);
}
/// <summary>
- /// Display the memory pool (that is, buffer cache) subsystem
+ /// Display the memory pool (buffer cache) subsystem
/// statistical information, as described by <see cref="MPoolStats"/>.
/// </summary>
/// <param name="PrintAll">
@@ -4247,10 +4562,31 @@ namespace BerkeleyDB {
/// </param>
public void PrintMPoolSystemStats(
bool PrintAll, bool ClearStats, bool HashChains) {
+ PrintMPoolSystemStats(PrintAll, ClearStats, HashChains, false);
+ }
+ /// <summary>
+ /// Display the memory pool (that is, buffer cache) subsystem
+ /// statistical information, as described by <see cref="MPoolStats"/>.
+ /// </summary>
+ /// <param name="PrintAll">
+ /// If true, display all available information.
+ /// </param>
+ /// <param name="PrintAlloc">
+ /// If true, display allocation information.
+ /// </param>
+ /// <param name="ClearStats">
+ /// If true, reset statistics after displaying their values.
+ /// </param>
+ /// <param name="HashChains">
+ /// If true, display the buffers with hash chains.
+ /// </param>
+ public void PrintMPoolSystemStats(
+ bool PrintAll, bool ClearStats, bool HashChains, bool PrintAlloc) {
uint flags = 0;
flags |= PrintAll ? DbConstants.DB_STAT_ALL : 0;
flags |= ClearStats ? DbConstants.DB_STAT_CLEAR : 0;
flags |= HashChains ? DbConstants.DB_STAT_MEMP_HASH : 0;
+ flags |= PrintAlloc ? DbConstants.DB_STAT_ALLOC : 0;
dbenv.memp_stat_print(flags);
}
@@ -4260,22 +4596,40 @@ namespace BerkeleyDB {
/// by <see cref="MutexStats"/>.
/// </summary>
public void PrintMutexSystemStats() {
- PrintMutexSystemStats(false, false);
+ PrintMutexSystemStats(false, false, false);
}
/// <summary>
/// Display the mutex subsystem statistical information, as described
/// by <see cref="MutexStats"/>.
/// </summary>
/// <param name="PrintAll">
- /// If true, display all available information.
- /// </param>
+ /// If true, display all available information.
+ /// </param>
/// <param name="ClearStats">
/// If true, reset statistics after displaying their values.
/// </param>
public void PrintMutexSystemStats(bool PrintAll, bool ClearStats) {
+ PrintMutexSystemStats(PrintAll, ClearStats, false);
+ }
+ /// <summary>
+ /// Display the mutex subsystem statistical information, as described
+ /// by <see cref="MutexStats"/>.
+ /// </summary>
+ /// <param name="PrintAll">
+ /// If true, display all available information.
+ /// </param>
+ /// <param name="PrintAlloc">
+ /// If true, display allocation information.
+ /// </param>
+ /// <param name="ClearStats">
+ /// If true, reset statistics after displaying their values.
+ /// </param>
+ public void PrintMutexSystemStats(bool PrintAll, bool ClearStats,
+ bool PrintAlloc) {
uint flags = 0;
flags |= PrintAll ? DbConstants.DB_STAT_ALL : 0;
flags |= ClearStats ? DbConstants.DB_STAT_CLEAR : 0;
+ flags |= PrintAlloc ? DbConstants.DB_STAT_ALLOC : 0;
dbenv.mutex_stat_print(flags);
}
@@ -4292,8 +4646,8 @@ namespace BerkeleyDB {
/// described by <see cref="RepMgrStats"/>.
/// </summary>
/// <param name="PrintAll">
- /// If true, display all available information.
- /// </param>
+ /// If true, display all available information.
+ /// </param>
/// <param name="ClearStats">
/// If true, reset statistics after displaying their values.
/// </param>
@@ -4317,8 +4671,8 @@ namespace BerkeleyDB {
/// described by <see cref="ReplicationStats"/>.
/// </summary>
/// <param name="PrintAll">
- /// If true, display all available information.
- /// </param>
+ /// If true, display all available information.
+ /// </param>
/// <param name="ClearStats">
/// If true, reset statistics after displaying their values.
/// </param>
@@ -4332,54 +4686,78 @@ namespace BerkeleyDB {
}
/// <summary>
- /// Display the locking subsystem statistical information, as described
- /// by <see cref="LockStats"/>.
+ /// Display the default statistical information.
/// </summary>
public void PrintStats() {
- PrintStats(false, false, false);
+ PrintStats(false, false, false, false);
}
/// <summary>
- /// Display the locking subsystem statistical information, as described
- /// by <see cref="LockStats"/>.
+ /// Display the default statistical information.
/// </summary>
/// <param name="PrintAll">
- /// If true, display all available information.
- /// </param>
+ /// If true, display all available information.
+ /// </param>
/// <param name="ClearStats">
/// If true, reset statistics after displaying their values.
/// </param>
public void PrintStats(bool PrintAll, bool ClearStats) {
- PrintStats(PrintAll, ClearStats, false);
+ PrintStats(PrintAll, ClearStats, false, false);
}
/// <summary>
- /// Display the locking subsystem statistical information, as described
- /// by <see cref="LockStats"/>.
+ /// Display the default subsystem statistical information.
/// </summary>
public void PrintSubsystemStats() {
- PrintStats(false, false, true);
+ PrintStats(false, false, true, false);
}
/// <summary>
- /// Display the locking subsystem statistical information, as described
- /// by <see cref="LockStats"/>.
+ /// Display the default subsystem statistical information.
/// </summary>
/// <param name="PrintAll">
- /// If true, display all available information.
- /// </param>
+ /// If true, display all available information.
+ /// </param>
/// <param name="ClearStats">
/// If true, reset statistics after displaying their values.
/// </param>
public void PrintSubsystemStats(bool PrintAll, bool ClearStats) {
- PrintStats(PrintAll, ClearStats, true);
+ PrintStats(PrintAll, ClearStats, true, false);
}
/// <summary>
- /// Display the locking subsystem statistical information, as described
- /// by <see cref="LockStats"/>.
+ /// Display the default statistical information.
+ /// </summary>
+ /// <param name="PrintAll">
+ /// If true, display all available information.
+ /// </param>
+ /// <param name="ClearStats">
+ /// If true, reset statistics after displaying their values.
+ /// </param>
+ /// <param name="PrintSubs">
+ /// If true, display subsystem statistical information.
+ /// </param>
+ private void PrintStats(bool PrintAll, bool ClearStats, bool PrintSubs) {
+ PrintStats(PrintAll, ClearStats, PrintSubs, false);
+ }
+ /// <summary>
+ /// Display the default statistical information.
/// </summary>
- private void PrintStats(bool all, bool clear, bool subs) {
+ /// <param name="PrintAll">
+ /// If true, display all available information.
+ /// </param>
+ /// <param name="ClearStats">
+ /// If true, reset statistics after displaying their values.
+ /// </param>
+ /// <param name="PrintSubs">
+ /// If true, display subsystem statistical information.
+ /// </param>
+ /// <param name="PrintAlloc">
+ /// If true, display allocation information.
+ /// </param>
+ private void PrintStats(bool PrintAll, bool ClearStats, bool PrintSubs,
+ bool PrintAlloc) {
uint flags = 0;
- flags |= all ? DbConstants.DB_STAT_ALL : 0;
- flags |= clear ? DbConstants.DB_STAT_CLEAR : 0;
- flags |= subs ? DbConstants.DB_STAT_SUBSYSTEM : 0;
+ flags |= PrintAll ? DbConstants.DB_STAT_ALL : 0;
+ flags |= ClearStats ? DbConstants.DB_STAT_CLEAR : 0;
+ flags |= PrintSubs ? DbConstants.DB_STAT_SUBSYSTEM : 0;
+ flags |= PrintAlloc ? DbConstants.DB_STAT_ALLOC : 0;
dbenv.stat_print(flags);
}
@@ -4388,23 +4766,40 @@ namespace BerkeleyDB {
/// described by <see cref="TransactionStats"/>.
/// </summary>
public void PrintTransactionSystemStats() {
- PrintTransactionSystemStats(false, false);
+ PrintTransactionSystemStats(false, false, false);
}
/// <summary>
/// Display the transaction subsystem statistical information, as
/// described by <see cref="TransactionStats"/>.
/// </summary>
/// <param name="PrintAll">
- /// If true, display all available information.
- /// </param>
+ /// If true, display all available information.
+ /// </param>
/// <param name="ClearStats">
/// If true, reset statistics after displaying their values.
/// </param>
- public void
- PrintTransactionSystemStats(bool PrintAll, bool ClearStats) {
+ public void PrintTransactionSystemStats(bool PrintAll, bool ClearStats) {
+ PrintTransactionSystemStats(PrintAll, ClearStats, false);
+ }
+ /// <summary>
+ /// Display the transaction subsystem statistical information, as
+ /// described by <see cref="TransactionStats"/>.
+ /// </summary>
+ /// <param name="PrintAll">
+ /// If true, display all available information.
+ /// </param>
+ /// <param name="ClearStats">
+ /// If true, reset statistics after displaying their values.
+ /// </param>
+ /// <param name="PrintAlloc">
+ /// If true, display allocation information.
+ /// </param>
+ public void PrintTransactionSystemStats(bool PrintAll, bool ClearStats,
+ bool PrintAlloc) {
uint flags = 0;
flags |= PrintAll ? DbConstants.DB_STAT_ALL : 0;
flags |= ClearStats ? DbConstants.DB_STAT_CLEAR : 0;
+ flags |= PrintAlloc ? DbConstants.DB_STAT_ALLOC : 0;
dbenv.txn_stat_print(flags);
}
diff --git a/lang/csharp/src/DatabaseEnvironmentConfig.cs b/lang/csharp/src/DatabaseEnvironmentConfig.cs
index d3d76a0f..75576195 100644
--- a/lang/csharp/src/DatabaseEnvironmentConfig.cs
+++ b/lang/csharp/src/DatabaseEnvironmentConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -16,7 +16,7 @@ namespace BerkeleyDB {
/// </summary>
public class DatabaseEnvironmentConfig {
/// <summary>
- /// Create a new object, with default settings
+ /// Create a new object with default settings
/// </summary>
public DatabaseEnvironmentConfig() {
DataDirs = new List<string>();
@@ -51,12 +51,12 @@ namespace BerkeleyDB {
/// <para>
/// When an error occurs in the Berkeley DB library, a
/// <see cref="DatabaseException"/>, or subclass of DatabaseException,
- /// is thrown. In some cases, however, the exception may be insufficient
+ /// is thrown. In some cases the exception may be insufficient
/// to completely describe the cause of the error, especially during
/// initial application debugging.
/// </para>
/// <para>
- /// In some cases, when an error occurs, Berkeley DB will call the given
+ /// In some cases, when an error occurs, Berkeley DB calls the given
/// delegate with additional error information. It is up to the delegate
/// to display the error message in an appropriate manner.
/// </para>
@@ -119,9 +119,9 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// Paths specified to <see cref="Database.Open"/> will be searched
+ /// Paths specified to <see cref="Database.Open"/> are searched
/// relative to this path. Paths set using this method are additive, and
- /// specifying more than one will result in each specified directory
+ /// specifying more than one results in each specified directory
/// being searched for database files.
/// </para>
/// <para>
@@ -136,7 +136,7 @@ namespace BerkeleyDB {
/// The path of a directory to be used as the location to create the
/// access method database files. When <see cref="BTreeDatabase.Open"/>,
/// <see cref="HashDatabase.Open"/>, <see cref="QueueDatabase.Open"/> or
- /// <see cref="RecnoDatabase.Open"/> is used to create a file it will be
+ /// <see cref="RecnoDatabase.Open"/> is used to create a file, it will be
/// created relative to this path.
/// </summary>
/// <remarks>
@@ -151,6 +151,38 @@ namespace BerkeleyDB {
/// </para>
/// </remarks>
public string CreationDir;
+ /// <summary>
+ /// The path of the directory where blobs are stored.
+ /// </summary>
+ public string BlobDir;
+
+ internal bool blobThresholdIsSet;
+ private uint blobThreshold;
+ /// <summary>
+ /// The size in bytes which is used to determine when a data item will
+ /// be stored as a blob.
+ /// <para>
+ /// Any data item that is equal to or larger in size than the
+ /// threshold value is automatically stored as a blob.
+ /// </para>
+ /// <para>
+ /// If the threshold value is 0, databases opened in the environment
+ /// default to never using blob support.
+ /// </para>
+ /// <para>
+ /// It is illegal to enable blob support in the environment if any of
+ /// <see cref="DatabaseEnvironmentConfig.TxnSnapshot"/>,
+ /// <see cref="DatabaseEnvironmentConfig.UseReplication"/>,
+ /// and <see cref="DatabaseEnvironmentConfig.UseMVCC"/> is set to true.
+ /// </para>
+ /// </summary>
+ public uint BlobThreshold {
+ get { return blobThreshold; }
+ set {
+ blobThresholdIsSet = true;
+ blobThreshold = value;
+ }
+ }
internal bool encryptionIsSet;
private String encryptPwd;
@@ -200,9 +232,9 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// By default, Berkeley DB does not create intermediate directories
- /// needed for recovery, that is, if the file /a/b/c/mydatabase is being
- /// recovered, and the directory path b/c does not exist, recovery will
- /// fail. This default behavior is because Berkeley DB does not know
+ /// needed for recovery. For example, if the file /a/b/c/mydatabase is being
+ /// recovered, and the directory path b/c does not exist, recovery
+ /// fails. This occurs because Berkeley DB does not know
/// what permissions are appropriate for intermediate directory
/// creation, and creating the directory might result in a security
/// problem.
@@ -270,13 +302,12 @@ namespace BerkeleyDB {
/// Transactions that update multiversion databases are not freed until
/// the last page version that the transaction created is flushed from
/// cache. This means that applications using multi-version concurrency
- /// control may need a transaction for each page in cache, in the
- /// extreme case.
+ /// control may need in the extreme case a transaction for each page in cache.
/// </para>
/// <para>
/// When all of the memory available in the database environment for
/// transactions is in use, calls to
- /// <see cref="DatabaseEnvironment.BeginTransaction"/> will fail (until
+ /// <see cref="DatabaseEnvironment.BeginTransaction"/> fail (until
/// some active transactions complete). If MaxTransactions is never set,
/// the database environment is configured to support at least 100
/// active transactions.
@@ -308,12 +339,12 @@ namespace BerkeleyDB {
public string MetadataDir;
/// <summary>
- /// The path of a directory to be used as the location of temporary
+ /// The path of a directory to be used as the location for temporary
/// files.
/// </summary>
/// <remarks>
/// <para>
- /// The files created to back in-memory access method databases will be
+ /// The files created to back in-memory access method databases are
/// created relative to this path. These temporary files can be quite
/// large, depending on the size of the database.
/// </para>
@@ -350,8 +381,8 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// ThreadCount must set if <see cref="DatabaseEnvironment.FailCheck"/>
- /// will be used. ThreadCount does not set the maximum number of threads
- /// but is used to determine memory sizing and the thread control block
+ /// is used. ThreadCount does not set the maximum number of threads.
+ /// It is used to determine memory sizing and the thread control block
/// reclamation policy.
/// </para>
/// <para>
@@ -395,7 +426,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// InitLockers will be ignored.
+ /// InitLockers is ignored.
/// </para>
/// </remarks>
public uint InitThreadCount {
@@ -424,7 +455,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// InitLockers will be ignored.
+ /// InitLockers is ignored.
/// </para>
/// </remarks>
public uint InitTxnCount {
@@ -494,17 +525,17 @@ namespace BerkeleyDB {
/// <summary>
/// If true, database operations for which no explicit transaction
/// handle was specified, and which modify databases in the database
- /// environment, will be automatically enclosed within a transaction.
+ /// environment, are automatically enclosed within a transaction.
/// </summary>
public bool AutoCommit;
/// <summary>
- /// If true, Berkeley DB Concurrent Data Store applications will perform
+ /// If true, Berkeley DB Concurrent Data Store applications perform
/// locking on an environment-wide basis rather than on a per-database
/// basis.
/// </summary>
public bool CDB_ALLDB;
/// <summary>
- /// If true, Berkeley DB will flush database writes to the backing disk
+ /// If true, Berkeley DB flushes database writes to the backing disk
/// before returning from the write system call, rather than flushing
/// database writes explicitly in a separate system call, as necessary.
/// </summary>
@@ -514,36 +545,35 @@ namespace BerkeleyDB {
/// or systems supporting the Windows FILE_FLAG_WRITE_THROUGH flag).
/// This flag may result in inaccurate file modification times and other
/// file-level information for Berkeley DB database files. This flag
- /// will almost certainly result in a performance decrease on most
- /// systems. This flag is only applicable to certain filesysystems (for
+ /// almost certainly results in a performance decrease on most
+ /// systems. This flag is only applicable to certain filesystems (for
/// example, the Veritas VxFS filesystem), where the filesystem's
/// support for trickling writes back to stable storage behaves badly
/// (or more likely, has been misconfigured).
/// </remarks>
public bool ForceFlush;
- ///
- /// <summary> Set a flag in the environment indicating that a
- /// hot backup is in progress.
- /// </summary>
- /// <remarks>
- /// When a "hot backup" copy of a database environment is taken, this
- /// attribute should be configured in the environment prior to copying.
- /// If any transactions with the bulk insert optimization enabled (i.e.,
- /// started with the Bulk configuration attribute) are in progress,
- /// setting the HotBackupInProgress attribute will force a checkpoint in
- /// the environment. After this attribute is set, the bulk insert
- /// optimization is disabled, until the attribute is reset. Using this
- /// protocol allows a hot backup procedure to make a consistent copy of
- /// the database even when bulk transactions are ongoing. Please see the
- /// discussion of hot backups in the Getting Started With Transactions
- /// Guide, and the description of the Bulk attribute in
- /// <see cref="TransactionConfig.Bulk"/>for more information.
+ ///
+ /// <summary> Set a flag in the environment indicating that a
+ /// hot backup is in progress.
+ /// </summary>
+ /// <remarks>
+ /// When a "hot backup" copy of a database environment is taken, this
+ /// attribute should be configured in the environment prior to copying.
+ /// If any transactions with the bulk insert optimization enabled (i.e.,
+ /// started with the Bulk configuration attribute) are in progress,
+ /// setting the HotBackupInProgress attribute forces a checkpoint in
+ /// the environment. After this attribute is set, the bulk insert
+ /// optimization is disabled, until the attribute is reset. Using this
+ /// protocol allows a hot backup procedure to make a consistent copy of
+ /// the database even when bulk transactions are ongoing. For more information
+ /// about hot backups see the Getting Started With Transactions Guide. To learn more
+ /// about the Bulk attribute see <see cref="TransactionConfig.Bulk"/>.
/// </remarks>
public bool HotbackupInProgress;
/// <summary>
- /// If true, Berkeley DB will page-fault shared regions into memory when
+ /// If true, Berkeley DB page-faults shared regions into memory when
/// initially creating or joining a Berkeley DB environment. In
- /// addition, Berkeley DB will write the shared regions when creating an
+ /// addition, Berkeley DB writes the shared regions when creating an
/// environment, forcing the underlying virtual memory and filesystems
/// to instantiate both the necessary memory and the necessary disk
/// space. This can also avoid out-of-disk space failures later on.
@@ -563,20 +593,20 @@ namespace BerkeleyDB {
/// </summary>
public bool NoBuffer;
/// <summary>
- /// If true, Berkeley DB will grant all requested mutual exclusion
+ /// If true, Berkeley DB grants all requested mutual exclusion
/// mutexes and database locks without regard for their actual
/// availability. This functionality should never be used for purposes
/// other than debugging.
/// </summary>
public bool NoLocking;
/// <summary>
- /// If true, Berkeley DB will copy read-only database files into the
+ /// If true, Berkeley DB copies read-only database files into the
/// local cache instead of potentially mapping them into process memory
/// (see <see cref="MPoolConfig.MMapSize"/> for further information).
/// </summary>
public bool NoMMap;
/// <summary>
- /// If true, Berkeley DB will ignore any panic state in the database
+ /// If true, Berkeley DB ignores any panic state in the database
/// environment. (Database environments in a panic state normally refuse
/// all attempts to call Berkeley DB functions, throwing
/// <see cref="RunRecoveryException"/>. This functionality should never
@@ -589,29 +619,29 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// Berkeley DB overwrites files using alternating 0xff, 0x00 and 0xff
- /// byte patterns. For file overwriting to be effective, the underlying
+ /// byte patterns. For an effective overwrite, the underlying
/// file must be stored on a fixed-block filesystem. Systems with
- /// journaling or logging filesystems will require operating system
+ /// journaling or logging filesystems require operating system
/// support and probably modification of the Berkeley DB sources.
/// </remarks>
public bool Overwrite;
/// <summary>
/// If true, database calls timing out based on lock or transaction
- /// timeout values will throw <see cref="LockNotGrantedException"/>
+ /// timeout values throw <see cref="LockNotGrantedException"/>
/// instead of <see cref="DeadlockException"/>. This allows applications
/// to distinguish between operations which have deadlocked and
/// operations which have exceeded their time limits.
/// </summary>
public bool TimeNotGranted;
/// <summary>
- /// If true, Berkeley DB will not write or synchronously flush the log
+ /// If true, Berkeley DB does not write or synchronously flush the log
/// on transaction commit.
/// </summary>
/// <remarks>
/// This means that transactions exhibit the ACI (atomicity,
- /// consistency, and isolation) properties, but not D (durability); that
- /// is, database integrity will be maintained, but if the application or
- /// system fails, it is possible some number of the most recently
+ /// consistency, and isolation) properties, but not D (durability);
+ /// database integrity is maintained, but if the application or
+ /// system fails, it is possible that some number of the most recently
/// committed transactions may be undone during recovery. The number of
/// transactions at risk is governed by how many log updates can fit
/// into the log buffer, how often the operating system flushes dirty
@@ -627,37 +657,37 @@ namespace BerkeleyDB {
/// </summary>
public bool TxnNoWait;
/// <summary>
- /// If true, all transactions in the environment will be started as if
+ /// If true, all transactions in the environment are started as if
/// <see cref="TransactionConfig.Snapshot"/> were passed to
/// <see cref="DatabaseEnvironment.BeginTransaction"/>, and all
- /// non-transactional cursors will be opened as if
+ /// non-transactional cursors are opened as if
/// <see cref="CursorConfig.SnapshotIsolation"/> were passed to
/// <see cref="BaseDatabase.Cursor"/>.
/// </summary>
public bool TxnSnapshot;
/// <summary>
- /// If true, Berkeley DB will write, but will not synchronously flush,
+ /// If true, Berkeley DB writes, but does not synchronously flush,
/// the log on transaction commit.
/// </summary>
/// <remarks>
/// This means that transactions exhibit the ACI (atomicity,
- /// consistency, and isolation) properties, but not D (durability); that
- /// is, database integrity will be maintained, but if the system fails,
- /// it is possible some number of the most recently committed
+ /// consistency, and isolation) properties, but not D (durability);
+ /// database integrity is maintained, but if the system fails,
+ /// it is possible that some number of the most recently committed
/// transactions may be undone during recovery. The number of
/// transactions at risk is governed by how often the system flushes
/// dirty buffers to disk and how often the log is checkpointed.
/// </remarks>
public bool TxnWriteNoSync;
/// <summary>
- /// If true, all databases in the environment will be opened as if
+ /// If true, all databases in the environment are opened as if
/// <see cref="DatabaseConfig.UseMVCC"/> is passed to
- /// <see cref="Database.Open"/>. This flag will be ignored for queue
+ /// <see cref="Database.Open"/>. This flag is ignored for queue
/// databases for which MVCC is not supported.
/// </summary>
public bool UseMVCC;
/// <summary>
- /// If true, Berkeley DB will yield the processor immediately after each
+ /// If true, Berkeley DB yields the processor immediately after each
/// page or mutex acquisition. This functionality should never be used
/// for purposes other than stress testing.
/// </summary>
@@ -689,21 +719,21 @@ namespace BerkeleyDB {
/* Fields for open() flags */
/// <summary>
- /// If true, Berkeley DB subsystems will create any underlying files, as
+ /// If true, Berkeley DB subsystems create any underlying files, as
/// necessary.
/// </summary>
public bool Create;
/// <summary>
- /// If true, the created <see cref="DatabaseEnvironment"/> object will
- /// be free-threaded; that is, concurrently usable by multiple threads
+ /// If true, the created <see cref="DatabaseEnvironment"/> object is
+ /// free-threaded; that is, concurrently usable by multiple threads
/// in the address space.
/// </summary>
/// <remarks>
/// <para>
/// Required to be true if the created <see cref="DatabaseEnvironment"/>
- /// object will be concurrently used by more than one thread in the
+ /// object is concurrently used by more than one thread in the
/// process, or if any <see cref="Database"/> objects opened in the
- /// scope of the <see cref="DatabaseEnvironment"/> object will be
+ /// scope of the <see cref="DatabaseEnvironment"/> object is
/// concurrently used by more than one thread in the process.
/// </para>
/// <para>Required to be true when using the Replication Manager.</para>
@@ -720,7 +750,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// This setting implies the environment will only be accessed by a
+ /// This setting implies the environment is only accessed by a
/// single process (although that process may be multithreaded). This
/// flag has two effects on the Berkeley DB environment. First, all
/// underlying data structures are allocated from per-process memory
@@ -747,32 +777,32 @@ namespace BerkeleyDB {
/// <remarks>
/// If recovery needs to be performed for any reason (including the
/// initial use of this setting), and <see cref="RunRecovery"/>is also
- /// specified, recovery will be performed and the open will proceed
+ /// specified, recovery is performed and the open proceeds
/// normally. If recovery needs to be performed and
/// <see cref="RunRecovery"/> is not specified,
- /// <see cref="RunRecoveryException"/> will be thrown. If recovery does
- /// not need to be performed, <see cref="RunRecovery"/> will be ignored.
+ /// <see cref="RunRecoveryException"/> is thrown. If recovery does
+ /// not need to be performed, <see cref="RunRecovery"/> is ignored.
/// See Architecting Transactional Data Store applications in the
/// Programmer's Reference Guide for more information.
/// </remarks>
public bool Register;
/// <summary>
- /// If true, catastrophic recovery will be run on this environment
+ /// If true, catastrophic recovery is run on this environment
/// before opening it for normal use.
/// </summary>
/// <remarks>
/// If true, the <see cref="Create"/> and <see cref="UseTxns"/> must
- /// also be set, because the regions will be removed and re-created,
+ /// also be set, because the regions are going to be removed and re-created,
/// and transactions are required for application recovery.
/// </remarks>
public bool RunFatalRecovery;
/// <summary>
- /// If true, normal recovery will be run on this environment before
+ /// If true, normal recovery is run on this environment before
/// opening it for normal use.
/// </summary>
/// <remarks>
/// If true, the <see cref="Create"/> and <see cref="UseTxns"/> must
- /// also be set, because the regions will be removed and re-created,
+ /// also be set, because the regions are going to be removed and re-created,
/// and transactions are required for application recovery.
/// </remarks>
public bool RunRecovery;
@@ -796,7 +826,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// Because permitting users to specify which files are used can create
- /// security problems, environment information will be used in file
+ /// security problems, environment information is used in file
/// naming for all users only if UseEnvironmentVars is true.
/// </para>
/// </remarks>
diff --git a/lang/csharp/src/DatabaseException.cs b/lang/csharp/src/DatabaseException.cs
index 516a688e..48026bb1 100644
--- a/lang/csharp/src/DatabaseException.cs
+++ b/lang/csharp/src/DatabaseException.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -46,6 +46,8 @@ namespace BerkeleyDB {
throw new LockNotGrantedException();
case ErrorCodes.DB_LOG_BUFFER_FULL:
throw new FullLogBufferException();
+ case ErrorCodes.DB_META_CHKSUM_FAIL:
+ throw new MetaCheckSumFailException();
case ErrorCodes.DB_OLD_VERSION:
throw new OldVersionException();
case ErrorCodes.DB_PAGE_NOTFOUND:
@@ -133,12 +135,12 @@ namespace BerkeleyDB {
/// <summary>
/// The requested key/data pair logically exists but was never explicitly
/// created by the application, or that the requested key/data pair was
- /// deleted and never re-created. In addition, the Queue access method will
- /// throw a KeyEmptyException for records that were created as part of a
+ /// deleted and never re-created. In addition, the Queue access method
+ /// throws a KeyEmptyException for records that were created as part of a
/// transaction that was later aborted and never re-created.
/// </summary>
/// <remarks>
- /// The Recno and Queue access methods will automatically create key/data
+ /// The Recno and Queue access methods automatically create key/data
/// pairs under some circumstances.
/// </remarks>
public class KeyEmptyException : DatabaseException {
@@ -191,7 +193,7 @@ namespace BerkeleyDB {
/// <summary>
/// If <see cref="DatabaseEnvironmentConfig.TimeNotGranted"/> is true,
/// database calls timing out based on lock or transaction timeout values
- /// will throw a LockNotGrantedException, instead of a DeadlockException.
+ /// throw a LockNotGrantedException, instead of a DeadlockException.
/// </summary>
public class LockNotGrantedException : DatabaseException {
/// <summary>
@@ -209,6 +211,19 @@ namespace BerkeleyDB {
}
/// <summary>
+ /// A checksum mismatch was detected on a database metadata page. Either
+ /// the database is corrupted or the file is not a Berkeley DB database
+ /// file.
+ /// </summary>
+ public class MetaCheckSumFailException : DatabaseException {
+ /// <summary
+ /// Initialize a new instance of the MetaCheckSumFailException
+ /// </summary>
+ public MetaCheckSumFailException()
+ : base(ErrorCodes.DB_META_CHKSUM_FAIL) { }
+ }
+
+ /// <summary>
/// The requested key/data pair did not exist in the database or that
/// start-of- or end-of-file has been reached by a cursor.
/// </summary>
@@ -242,7 +257,7 @@ namespace BerkeleyDB {
/// <summary>
/// Berkeley DB has encountered an error it considers fatal to an entire
/// environment. Once a RunRecoveryException has been thrown by any
- /// interface, it will be returned from all subsequent Berkeley DB calls
+ /// interface, it is returned from all subsequent Berkeley DB calls
/// made by any threads of control participating in the environment.
/// </summary>
/// <remarks>
@@ -274,7 +289,7 @@ namespace BerkeleyDB {
}
/// <summary>
- /// The version of the Berkeley DB library doesn't match the version that
+ /// The version of the Berkeley DB library does not match the version that
/// created the database environment.
/// </summary>
public class VersionMismatchException : DatabaseException {
diff --git a/lang/csharp/src/DatabaseStream.cs b/lang/csharp/src/DatabaseStream.cs
new file mode 100644
index 00000000..d7aa6a66
--- /dev/null
+++ b/lang/csharp/src/DatabaseStream.cs
@@ -0,0 +1,146 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ *
+ */
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using BerkeleyDB.Internal;
+
+namespace BerkeleyDB {
+ /// <summary>
+ /// A class representing a database stream,
+ /// which allows streaming access to blobs.
+ /// </summary>
+ public class DatabaseStream : IDisposable{
+ /// <summary>
+ /// The underlying DB_STREAM handle
+ /// </summary>
+ internal DB_STREAM dbs;
+ private bool isOpen;
+ private DatabaseStreamConfig config;
+ static internal DB_STREAM getDBSTREAM(DatabaseStream dbstream) {
+ return dbstream == null ? null : dbstream.dbs;
+ }
+
+ internal DatabaseStream(DB_STREAM dbstream,
+ DatabaseStreamConfig config) {
+ this.dbs = dbstream;
+ isOpen = true;
+ this.config = config;
+ }
+
+ /// <summary>
+ /// Return the database stream configuration.
+ /// </summary>
+ /// <returns>
+ /// Return the database stream configuration.
+ /// </returns>
+ public DatabaseStreamConfig GetConfig {
+ get {
+ return config;
+ }
+ }
+
+ /// <summary>
+ /// <para>
+ /// Discard the database stream.
+ /// </para>
+ /// <para>
+ /// It is possible for the Close() method to throw a
+ /// <see cref="DatabaseException"/> if there is any failure.
+ /// </para>
+ /// <para>
+ /// After Close has been called, regardless of its result, the database
+ /// stream handle cannot be used again.
+ /// Always close the stream when you have finished accessing the BLOB.
+ /// </para>
+ /// </summary>
+ /// <exception cref="DatabaseException"></exception>
+ public void Close() {
+ dbs.close(0);
+
+ isOpen = false;
+ }
+
+ /// <summary>
+ /// Release the resources held by this object, and close the database
+ /// stream if it is still open.
+ /// </summary>
+ public void Dispose() {
+ try {
+ if (isOpen)
+ Close();
+ } catch {
+ /*
+ * Errors here are likely because our cursor has been closed out
+ * from under us. Not much we can do, just move on.
+ */
+ }
+ dbs.Dispose();
+ GC.SuppressFinalize(this);
+ }
+
+ /// <summary>
+ /// Read from the blob accessed by this database stream.
+ /// </summary>
+ /// <param name="offset">
+ /// The position in bytes in the blob where the reading starts.
+ /// </param>
+ /// <param name="size">
+ /// The number of bytes to read.
+ /// </param>
+ /// <returns>
+ /// <see cref="DatabaseEntry"/> which contains the data read from
+ /// the database stream.
+ /// </returns>
+ /// <exception cref="DatabaseException">
+ /// Thrown if there is any failure.
+ /// </exception>
+ public DatabaseEntry Read(Int64 offset, uint size) {
+ DatabaseEntry data = new DatabaseEntry();
+ dbs.read(data, offset, size, 0);
+ return data;
+ }
+
+ /// <summary>
+ /// Return the size of the blob in bytes accessed by the database
+ /// stream.
+ /// </summary>
+ /// <returns>
+ /// Return the size of the blob in bytes accessed by the database
+ /// stream.
+ /// </returns>
+ public Int64 Size() {
+ Int64 ret = 0;
+ dbs.size(ref ret, 0);
+ return ret;
+ }
+
+ /// <summary>
+ /// Write to the blob accessed by the database stream.
+ /// </summary>
+ /// <param name="data">
+ /// The <see cref="DatabaseEntry"/> containing the data to write.
+ /// into the blob.
+ /// </param>
+ /// <param name="offset">
+ /// The position in bytes in the blob where the writing starts.
+ /// </param>
+ /// <returns>
+ /// True if the writing succeeds and false otherwise.
+ /// </returns>
+ /// <exception cref="DatabaseException">
+ /// Thrown if there is any failure.
+ /// </exception>
+ public bool Write(DatabaseEntry data, Int64 offset) {
+ bool ret = true;
+ if (dbs.write(data, offset, 0) != 0)
+ ret = false;
+ return ret;
+ }
+ }
+}
diff --git a/lang/csharp/src/DatabaseStreamConfig.cs b/lang/csharp/src/DatabaseStreamConfig.cs
new file mode 100644
index 00000000..b42c9889
--- /dev/null
+++ b/lang/csharp/src/DatabaseStreamConfig.cs
@@ -0,0 +1,58 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.Text;
+using BerkeleyDB.Internal;
+
+namespace BerkeleyDB {
+ /// <summary>
+ /// A class representing configuration parameters for
+ /// <see cref="DatabaseStream"/>
+ /// </summary>
+ public class DatabaseStreamConfig {
+ internal bool readOnlyIsSet;
+ private bool readOnly;
+ /// <summary>
+ /// The database stream is read only.
+ /// </summary>
+ public bool ReadOnly {
+ get {
+ return readOnly;
+ }
+ set {
+ readOnlyIsSet = true;
+ readOnly = value;
+ }
+ }
+
+ /// <summary>
+ /// True if the database stream syncs the blob on each write.
+ /// </summary>
+ public bool SyncPerWrite;
+
+ /// <summary>
+ /// Instantiate a new DatabaseStreamConfig object.
+ /// </summary>
+ public DatabaseStreamConfig() {
+ readOnly = false;
+ SyncPerWrite = false;
+ }
+
+ internal uint flags {
+ get {
+ uint ret = 0;
+ if (readOnlyIsSet)
+ ret |= readOnly ? DbConstants.DB_STREAM_READ :
+ DbConstants.DB_STREAM_WRITE;
+ if (SyncPerWrite)
+ ret |= DbConstants.DB_STREAM_SYNC_WRITE;
+ return ret;
+ }
+ }
+ }
+}
diff --git a/lang/csharp/src/DatabaseType.cs b/lang/csharp/src/DatabaseType.cs
index f6a4d499..bcee9344 100644
--- a/lang/csharp/src/DatabaseType.cs
+++ b/lang/csharp/src/DatabaseType.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/DbChannel.cs b/lang/csharp/src/DbChannel.cs
index b99548bb..dd650011 100644
--- a/lang/csharp/src/DbChannel.cs
+++ b/lang/csharp/src/DbChannel.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -40,7 +40,7 @@ namespace BerkeleyDB {
/// <summary>
/// Release the resources held by this object, and close the channel if
- /// it's still open.
+ /// it is still open.
/// </summary>
public void Dispose() {
if (isOpen)
@@ -67,8 +67,8 @@ namespace BerkeleyDB {
/// <para>
/// The sent message is received and handled at remote sites using a
/// message dispatch callback, which is configured using
- /// <see cref="DatabaseEnvironment.RepMessageDispatch"/>. Note that this
- /// method may be used within the the message dispatch callback on the
+ /// <see cref="DatabaseEnvironment.RepMessageDispatch"/>. This
+ /// method may be used within the message dispatch callback on the
/// remote site to send a reply or acknowledgement for messages that it
/// receives and is handling.
/// </para>
diff --git a/lang/csharp/src/DbSite.cs b/lang/csharp/src/DbSite.cs
index 6285c5a5..8dc53b70 100644
--- a/lang/csharp/src/DbSite.cs
+++ b/lang/csharp/src/DbSite.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -59,7 +59,7 @@ namespace BerkeleyDB {
/// <remarks>
/// A remote site may be a helper site when the local site first joins
/// the replication group. Once the local site has been established as
- /// a member of the group, this config setting is ignored.
+ /// a member of the group, this configuration setting is ignored.
/// </remarks>
public bool Helper {
get {
@@ -78,7 +78,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// Specify the site in a legacy group. It would be considered as part
- /// of an existing group, upgrading from a previous version of BDB. All
+ /// of an existing group, upgrading from a previous version of Berkeley DB. All
/// sites in the legacy group must specify this for themselves (the
/// local site) and for all other sites initially in the group.
/// </remarks>
@@ -95,7 +95,7 @@ namespace BerkeleyDB {
}
/// <summary>
- /// Whether it is local site.
+ /// Whether it is a local site.
/// </summary>
public bool LocalSite {
get {
@@ -110,7 +110,7 @@ namespace BerkeleyDB {
}
/// <summary>
- /// Whether the site is peer to local site.
+ /// Whether the site is peer to a local site.
/// </summary>
/// <remarks>
/// A peer site may be used as a target for "client-to-client"
@@ -154,7 +154,7 @@ namespace BerkeleyDB {
/// <summary>
/// Release the resources held by this object, and close the site if
- /// it's still open.
+ /// it is still open.
/// </summary>
public void Dispose() {
if (isOpen)
diff --git a/lang/csharp/src/DbSiteConfig.cs b/lang/csharp/src/DbSiteConfig.cs
index dc33a782..482e1e4c 100644
--- a/lang/csharp/src/DbSiteConfig.cs
+++ b/lang/csharp/src/DbSiteConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -69,7 +69,7 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// Specify the site in a legacy group. It would be considered as part
- /// of an existing group, upgrading from a previous version of BDB. All
+ /// of an existing group, upgrading from a previous version of Berkeley DB. All
/// sites in the legacy group must specify this for themselves (the
/// local site) and for all other sites initially in the group.
/// </remarks>
diff --git a/lang/csharp/src/DbThreadID.cs b/lang/csharp/src/DbThreadID.cs
index eab3ccbc..6d6c1202 100644
--- a/lang/csharp/src/DbThreadID.cs
+++ b/lang/csharp/src/DbThreadID.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/DeadlockPolicy.cs b/lang/csharp/src/DeadlockPolicy.cs
index f4039b5c..782b3cdd 100644
--- a/lang/csharp/src/DeadlockPolicy.cs
+++ b/lang/csharp/src/DeadlockPolicy.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/Delegates.cs b/lang/csharp/src/Delegates.cs
index 28c4e832..8ec7b1e2 100644
--- a/lang/csharp/src/Delegates.cs
+++ b/lang/csharp/src/Delegates.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -46,8 +46,15 @@ namespace BerkeleyDB {
BTreeDecompressDelegate(DatabaseEntry prevKey,
DatabaseEntry prevData, byte[] compressed, out uint bytesRead);
/// <summary>
- /// The application-specified feedback function called to report Berkeley DB
- /// operation progress.
+ /// An application-specified partitioning function.
+ /// </summary>
+ /// <param name="key">
+ /// The value used to determine which partition number should be returned.
+ /// </param>
+ public delegate uint PartitionDelegate(DatabaseEntry key);
+ /// <summary>
+ /// The application-specified feedback function called to report the operation
+ /// progress of Berkeley DB.
/// </summary>
/// <param name="opcode">
/// An operation code specifying the Berkley DB operation
@@ -111,7 +118,7 @@ namespace BerkeleyDB {
/// <param name="event_info">
/// Additional information describing an event. By default, event_info is
/// null; specific events may pass non-null values, in which case the event
- /// will also describe the information's structure.
+ /// also describes the information's structure.
/// </param>
public delegate void EventNotifyDelegate(
NotificationEvent eventcode, byte[] event_info);
@@ -151,6 +158,28 @@ namespace BerkeleyDB {
public delegate void MessageDispatchDelegate(DbChannel channel,
ref DatabaseEntry[] requests, out uint size, bool need_response);
/// <summary>
+ /// The application-specified reporting function.
+ /// </summary>
+ /// <param name="Message">The message string</param>
+ public delegate void MessageFeedbackDelegate(string Message);
+ /// <summary>
+ /// Application-specific function used by a replication view to determine
+ /// whether a database file is replicated to the local site.
+ /// </summary>
+ /// <param name="name">
+ /// The name of the database file.
+ /// </param>
+ /// <param name="result">
+ /// Indicates whether or not the database file should be replicated.
+ /// If non-zero, the database file is replicated; otherwise the database
+ /// file is not replicated.
+ /// </param>
+ /// <param name="flags">
+ /// Currently unused.
+ /// </param>
+ public delegate int ReplicationViewDelegate(string name,
+ ref int result, uint flags);
+ /// <summary>
/// The function used to transmit data using the replication application's
/// communication infrastructure.
/// </summary>
diff --git a/lang/csharp/src/Enums.cs b/lang/csharp/src/Enums.cs
index 5f884161..6e1ebd59 100644
--- a/lang/csharp/src/Enums.cs
+++ b/lang/csharp/src/Enums.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using BerkeleyDB.Internal;
@@ -40,14 +40,13 @@ namespace BerkeleyDB {
};
/// <summary>
- /// 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.
+ /// Policy for duplicate data items in the database. Allows a key/data
+ /// pair to be inserted into the database even if the key already exists.
/// </summary>
public enum DuplicatesPolicy : uint {
/// <summary>
- /// Insertion when the key of the key/data pair being inserted already
- /// exists in the database will fail.
+ /// Does not allow a key/data pair to be inserted into the database even
+ /// if the key already exists
/// </summary>
NONE = 0,
/// <summary>
@@ -151,7 +150,7 @@ namespace BerkeleyDB {
DEGREE_TWO,
/// <summary>
/// For the life of the transaction, every time a thread of control
- /// reads a data item, it will be unchanged from its previous value
+ /// reads a data item, it is 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.
/// </summary>
@@ -171,6 +170,11 @@ namespace BerkeleyDB {
/// </remarks>
PANIC = DbConstants.DB_EVENT_PANIC,
/// <summary>
+ /// The replication manager subordinate process was unable to take over
+ /// as the replication process.
+ /// </summary>
+ REP_AUTOTAKEOVER_FAILED = DbConstants.DB_EVENT_REP_AUTOTAKEOVER_FAILED,
+ /// <summary>
/// The local site is now a replication client.
/// </summary>
REP_CLIENT = DbConstants.DB_EVENT_REP_CLIENT,
@@ -202,7 +206,7 @@ namespace BerkeleyDB {
/// receiving this event, to reconfigure the local environment as a
/// replication master.
/// </para>
- /// <para>
+ /// <para>
/// Replication Manager applications may safely ignore this event. The
/// Replication Manager calls
/// <see cref="DatabaseEnvironment.RepStartMaster"/>
@@ -217,10 +221,15 @@ namespace BerkeleyDB {
/// message response from a sufficient number of remote sites.
/// </summary>
REP_ELECTION_FAILED = DbConstants.DB_EVENT_REP_ELECTION_FAILED,
- /// <summary>
- /// The internal initialization has been completed.
- /// </summary>
- REP_INIT_DONE = DbConstants.DB_EVENT_REP_INIT_DONE,
+ /// <summary>
+ /// The internal initialization has been completed.
+ /// </summary>
+ REP_INIT_DONE = DbConstants.DB_EVENT_REP_INIT_DONE,
+ /// <summary>
+ /// Incoming messages have been dropped because the Replication Mananger
+ /// incoming queue has reached its maximum threshold.
+ /// </summary>
+ REP_INQUEUE_FULL = DbConstants.DB_EVENT_REP_INQUEUE_FULL,
/// <summary>
/// The local site could not synchronize with the master because an
/// internal initialization was required, but internal initialization
diff --git a/lang/csharp/src/ErrorCodes.cs b/lang/csharp/src/ErrorCodes.cs
index 0b291ed9..167784b3 100644
--- a/lang/csharp/src/ErrorCodes.cs
+++ b/lang/csharp/src/ErrorCodes.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -19,11 +19,11 @@ namespace BerkeleyDB {
///</summary>
public const int DB_BUFFER_SMALL = DbConstants.DB_BUFFER_SMALL;
///<summary>
- /// "Null" return from 2ndary callbk.
+ /// "Null" return from secondary callback.
///</summary>
public const int DB_DONOTINDEX = DbConstants.DB_DONOTINDEX;
///<summary>
- /// A foreign db constraint triggered.
+ /// A foreign database constraint triggered.
///</summary>
public const int DB_FOREIGN_CONFLICT = DbConstants.DB_FOREIGN_CONFLICT;
/// <summary>
@@ -51,6 +51,10 @@ namespace BerkeleyDB {
///</summary>
public const int DB_LOG_BUFFER_FULL = DbConstants.DB_LOG_BUFFER_FULL;
///<summary>
+ /// Checksum mismatch detected.
+ ///</summary>
+ public const int DB_META_CHKSUM_FAIL = DbConstants.DB_META_CHKSUM_FAIL;
+ ///<summary>
/// Server panic return.
///</summary>
public const int DB_NOSERVER = DbConstants.DB_NOSERVER;
@@ -79,7 +83,7 @@ namespace BerkeleyDB {
///</summary>
public const int DB_REP_HOLDELECTION = DbConstants.DB_REP_HOLDELECTION;
///<summary>
- /// This msg should be ignored.
+ /// This message should be ignored.
///</summary>
public const int DB_REP_IGNORE = DbConstants.DB_REP_IGNORE;
///<summary>
@@ -128,4 +132,4 @@ namespace BerkeleyDB {
public const int DB_VERSION_MISMATCH = DbConstants.DB_VERSION_MISMATCH;
}
-} \ No newline at end of file
+}
diff --git a/lang/csharp/src/HashCursor.cs b/lang/csharp/src/HashCursor.cs
index 650aab29..60334c55 100644
--- a/lang/csharp/src/HashCursor.cs
+++ b/lang/csharp/src/HashCursor.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -20,6 +20,34 @@ namespace BerkeleyDB {
: base(dbc, DatabaseType.HASH, pagesize, p) { }
/// <summary>
+ /// Create a database stream pointing to a key/value pair where the
+ /// data item is a blob.
+ /// </summary>
+ /// <returns>A newly created database stream</returns>
+ /// <exception cref="DatabaseException">
+ /// Thrown if the data item is not a blob.
+ /// </exception>
+ public DatabaseStream DbStream() {
+ return DbStream(new DatabaseStreamConfig());
+ }
+
+ /// <summary>
+ /// Create a database stream pointing to a key/value pair where the
+ /// data item is a blob with the given configuration.
+ /// </summary>
+ /// <param name="cfg">
+ /// The configuration properties for the database stream.
+ /// </param>
+ /// <returns>A newly created database stream</returns>
+ /// <exception cref="DatabaseException">
+ /// Thrown if the data of the key/value pair it is pointing to is not
+ /// a blob.
+ /// </exception>
+ public DatabaseStream DbStream(DatabaseStreamConfig cfg) {
+ return new DatabaseStream(dbc.db_stream(cfg.flags), cfg);
+ }
+
+ /// <summary>
/// Create a new cursor that uses the same transaction and locker ID as
/// the original cursor.
/// </summary>
@@ -30,9 +58,9 @@ namespace BerkeleyDB {
/// <param name="keepPosition">
/// If true, the newly created cursor is initialized to refer to the
/// same position in the database as the original cursor (if any) and
- /// hold the same locks (if any). If false, or the original cursor does
+ /// hold the same locks (if any). If false, or if the original cursor does
/// not hold a database position and locks, the created cursor is
- /// uninitialized and will behave like a cursor newly created by
+ /// uninitialized and behaves like a cursor newly created by
/// <see cref="HashDatabase.Cursor"/>.</param>
/// <returns>A newly created cursor</returns>
public new HashCursor Duplicate(bool keepPosition) {
@@ -78,4 +106,4 @@ namespace BerkeleyDB {
base.Add(pair, loc);
}
}
-} \ No newline at end of file
+}
diff --git a/lang/csharp/src/HashDatabase.cs b/lang/csharp/src/HashDatabase.cs
index a52fff1b..5d36393d 100644
--- a/lang/csharp/src/HashDatabase.cs
+++ b/lang/csharp/src/HashDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -19,9 +19,13 @@ namespace BerkeleyDB {
private HashFunctionDelegate hashHandler;
private EntryComparisonDelegate compareHandler;
private EntryComparisonDelegate dupCompareHandler;
+ private PartitionDelegate partitionHandler;
private BDB_CompareDelegate doCompareRef;
private BDB_HashDelegate doHashRef;
private BDB_CompareDelegate doDupCompareRef;
+ private BDB_PartitionDelegate doPartitionRef;
+ private DatabaseEntry[] partitionKeys;
+ private uint nparts;
#region Constructors
private HashDatabase(DatabaseEnvironment env, uint flags)
@@ -31,10 +35,16 @@ namespace BerkeleyDB {
private void Config(HashDatabaseConfig cfg) {
base.Config(cfg);
/*
- * Database.Config calls set_flags, but that doesn't get the Hash
+ * Database.Config calls set_flags, but that does not get the Hash
* specific flags. No harm in calling it again.
*/
db.set_flags(cfg.flags);
+
+ if (cfg.BlobDir != null && cfg.Env == null)
+ db.set_blob_dir(cfg.BlobDir);
+
+ if (cfg.blobThresholdIsSet)
+ db.set_blob_threshold(cfg.BlobThreshold, 0);
if (cfg.HashFunction != null)
HashFunction = cfg.HashFunction;
@@ -48,6 +58,25 @@ namespace BerkeleyDB {
if (cfg.HashComparison != null)
Compare = cfg.HashComparison;
+ if (cfg.partitionIsSet) {
+ nparts = cfg.NParts;
+ Partition = cfg.Partition;
+ if (Partition == null)
+ doPartitionRef = null;
+ else
+ doPartitionRef = new BDB_PartitionDelegate(doPartition);
+ partitionKeys = cfg.PartitionKeys;
+ IntPtr[] ptrs = null;
+ if (partitionKeys != null) {
+ int size = (int)nparts - 1;
+ ptrs = new IntPtr[size];
+ for (int i = 0; i < size; i++) {
+ ptrs[i] = DBT.getCPtr(
+ DatabaseEntry.getDBT(partitionKeys[i])).Handle;
+ }
+ }
+ db.set_partition(nparts, ptrs, doPartitionRef);
+ }
}
/// <summary>
@@ -61,15 +90,15 @@ namespace BerkeleyDB {
/// the database can only be accessed by sharing the single database
/// object that created it, in circumstances where doing so is safe.
/// </para>
- /// <para>
+ /// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -93,18 +122,18 @@ namespace BerkeleyDB {
/// object that created it, in circumstances where doing so is safe. If
/// <paramref name="Filename"/> is null and
/// <paramref name="DatabaseName"/> is non-null, the database can be
- /// opened by other threads of control and will be replicated to client
+ /// opened by other threads of control and be replicated to client
/// sites in any replication group.
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -133,15 +162,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -172,21 +201,21 @@ namespace BerkeleyDB {
/// the database can only be accessed by sharing the single database
/// object that created it, in circumstances where doing so is safe. If
/// <paramref name="Filename"/> is null and
- /// <paramref name="DatabaseName"/> is non-null, the database can be
- /// opened by other threads of control and will be replicated to client
+ /// <paramref name="DatabaseName"/> is non-null, the database can be
+ /// opened by other threads of control and be replicated to client
/// sites in any replication group.
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -220,11 +249,12 @@ namespace BerkeleyDB {
#region Callbacks
private static int doDupCompare(
- IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p) {
+ IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p, IntPtr locp) {
DB db = new DB(dbp, false);
DBT dbt1 = new DBT(dbt1p, false);
DBT dbt2 = new DBT(dbt2p, false);
-
+ if (locp != IntPtr.Zero)
+ locp = IntPtr.Zero;
return ((HashDatabase)(db.api_internal)).DupCompare(
DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
}
@@ -235,19 +265,66 @@ namespace BerkeleyDB {
return ((HashDatabase)(db.api_internal)).hashHandler(t_data);
}
- private static int doCompare(IntPtr dbp, IntPtr dbtp1, IntPtr dbtp2) {
+ private static int doCompare(IntPtr dbp,
+ IntPtr dbtp1, IntPtr dbtp2, IntPtr locp) {
DB db = new DB(dbp, false);
DBT dbt1 = new DBT(dbtp1, false);
DBT dbt2 = new DBT(dbtp2, false);
+ if (locp != IntPtr.Zero)
+ locp = IntPtr.Zero;
return ((HashDatabase)(db.api_internal)).compareHandler(
DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
}
+ private static uint doPartition(IntPtr dbp, IntPtr dbtp) {
+ DB db = new DB(dbp, false);
+ DatabaseEntry dbt = DatabaseEntry.fromDBT(new DBT(dbtp, false));
+ HashDatabase btdb = (HashDatabase)(db.api_internal);
+ return btdb.Partition(dbt);
+ }
#endregion Callbacks
#region Properties
/// <summary>
+ /// The path of the directory where blobs are stored.
+ /// </summary>
+ public string BlobDir {
+ get {
+ string dir;
+ db.get_blob_dir(out dir);
+ return dir;
+ }
+ }
+
+ internal string BlobSubDir {
+ get {
+ string dir;
+ db.get_blob_sub_dir(out dir);
+ return dir;
+ }
+ }
+
+ /// <summary>
+ /// The threshold value in bytes beyond which data items are stored as
+ /// blobs.
+ /// <para>
+ /// Any data item that is equal to or larger in size than the
+ /// threshold value is automatically stored as a blob.
+ /// </para>
+ /// <para>
+ /// A value of 0 indicates that blobs are not used by the database.
+ /// </para>
+ /// </summary>
+ public uint BlobThreshold {
+ get {
+ uint ret = 0;
+ db.get_blob_threshold(ref ret);
+ return ret;
+ }
+ }
+
+ /// <summary>
/// The Hash key comparison function. The comparison function is called
/// whenever it is necessary to compare a key specified by the
/// application with a key currently stored in the tree.
@@ -346,8 +423,8 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If the operation occurs in a transactional database, the operation
- /// will be implicitly transaction protected using multiple
- /// transactions. These transactions will be periodically committed to
+ /// is implicitly transaction protected using multiple
+ /// transactions. These transactions are periodically committed to
/// avoid locking large sections of the tree. Any deadlocks encountered
/// cause the compaction operation to be retried from the point of the
/// last transaction commit.
@@ -373,8 +450,8 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
- /// protected using multiple transactions. These transactions will be
+ /// transactional database, the operation is implicitly transaction
+ /// protected using multiple transactions. These transactions are
/// periodically committed to avoid locking large sections of the tree.
/// Any deadlocks encountered cause the compaction operation to be
/// retried from the point of the last transaction commit.
@@ -507,7 +584,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="isoDegree">
/// The level of isolation for database reads.
- /// <see cref="Isolation.DEGREE_ONE"/> will be silently ignored for
+ /// <see cref="Isolation.DEGREE_ONE"/> is silently ignored for
/// databases which did not specify
/// <see cref="DatabaseConfig.ReadUncommitted"/>.
/// </param>
@@ -552,6 +629,39 @@ namespace BerkeleyDB {
}
/// <summary>
+ /// Return the number of partitions created in the database.
+ /// </summary>
+ public uint NParts {
+ get {
+ db.get_partition_parts(ref nparts);
+ return nparts;
+ }
+ private set { nparts = value; }
+ }
+
+ /// <summary>
+ /// Return the application-specified partitioning function.
+ /// </summary>
+ public PartitionDelegate Partition {
+ get { return partitionHandler; }
+ private set { partitionHandler = value; }
+ }
+
+ /// <summary>
+ /// Return an array of type DatabaseEntry where each array entry
+ /// contains the range of keys contained in one of the database's
+ /// partitions. The array contains the information for the entire
+ /// database.
+ /// </summary>
+ public DatabaseEntry[] PartitionKeys {
+ get {
+ partitionKeys = db.get_partition_keys();
+ return partitionKeys;
+ }
+ private set { partitionKeys = value; }
+ }
+
+ /// <summary>
/// Store the key/data pair in the database only if it does not already
/// appear in the database.
/// </summary>
@@ -618,7 +728,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="isoDegree">
/// The level of isolation for database reads.
- /// <see cref="Isolation.DEGREE_ONE"/> will be silently ignored for
+ /// <see cref="Isolation.DEGREE_ONE"/> is silently ignored for
/// databases which did not specify
/// <see cref="DatabaseConfig.ReadUncommitted"/>.
/// </param>
@@ -643,4 +753,4 @@ namespace BerkeleyDB {
}
#endregion Methods
}
-} \ No newline at end of file
+}
diff --git a/lang/csharp/src/HashDatabaseConfig.cs b/lang/csharp/src/HashDatabaseConfig.cs
index 468c6962..7f36b4da 100644
--- a/lang/csharp/src/HashDatabaseConfig.cs
+++ b/lang/csharp/src/HashDatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -16,9 +16,8 @@ namespace BerkeleyDB {
public class HashDatabaseConfig : DatabaseConfig {
/* Fields for db->set_flags() */
/// <summary>
- /// Policy for duplicate data items in the database; that is, insertion
- /// when the key of the key/data pair being inserted already exists in
- /// the database will be successful.
+ /// Policy for duplicate data items in the database. Allows a key/data pair
+ /// to be inserted into the database even if the key already exists.
/// </summary>
/// <remarks>
/// <para>
@@ -31,19 +30,19 @@ namespace BerkeleyDB {
/// duplicate comparison function. If the application does not specify a
/// comparison function using
/// <see cref="DuplicateCompare"/>, a default lexical
- /// comparison will be used.
+ /// comparison is be used.
/// </para>
- /// <para>
+ /// <para>
/// <see cref="DuplicatesPolicy.SORTED"/> is preferred to
/// <see cref="DuplicatesPolicy.UNSORTED"/> for performance reasons.
/// <see cref="DuplicatesPolicy.UNSORTED"/> should only be used by
/// applications wanting to order duplicate data items manually.
/// </para>
- /// <para>
+ /// <para>
/// If the database already exists, the value of Duplicates must be the
- /// same as the existing database or an error will be returned.
+ /// same as the existing database or an error is returned.
/// </para>
- /// </remarks>
+ /// </remarks>
public DuplicatesPolicy Duplicates;
internal new uint flags {
get {
@@ -59,7 +58,7 @@ namespace BerkeleyDB {
/// <remarks>
/// If the database does not already exist and
/// <see cref="CreatePolicy.NEVER"/> is set,
- /// <see cref="HashDatabase.Open"/> will fail.
+ /// <see cref="HashDatabase.Open"/> fails.
/// </remarks>
public CreatePolicy Creation;
internal new uint openFlags {
@@ -71,6 +70,46 @@ namespace BerkeleyDB {
}
/// <summary>
+ /// The path of the directory where blobs are stored.
+ /// <para>
+ /// If the database is opened within <see cref="DatabaseEnvironment"/>,
+ /// this path setting is ignored during
+ /// <see cref="HashDatabase.Open"/>. Use
+ /// <see cref="HashDatabase.BlobDir"/> to identify the current storage
+ /// location of blobs after opening the database.
+ /// </para>
+ /// </summary>
+ public string BlobDir;
+
+ internal bool blobThresholdIsSet;
+ private uint blobThreshold;
+ /// <summary>
+ /// The size in bytes which is used to determine when a data item
+ /// is stored as a blob.
+ /// <para>
+ /// Any data item that is equal to or larger in size than the
+ /// threshold value is automatically stored as a blob.
+ /// </para>
+ /// <para>
+ /// If the threshold value is 0, blobs are never be used by the
+ /// database.
+ /// </para>
+ /// <para>
+ /// It is illegal to enable blob support in the database which is configured
+ /// as in-memory database or with chksum, encryption, duplicates,
+ /// sorted duplicates, compression, multiversion concurrency control
+ /// and transactional read operations with degree 1 isolation.
+ /// </para>
+ /// </summary>
+ public uint BlobThreshold {
+ get { return blobThreshold; }
+ set {
+ blobThresholdIsSet = true;
+ blobThreshold = value;
+ }
+ }
+
+ /// <summary>
/// The Hash key comparison function.
/// </summary>
/// <remarks>
@@ -95,7 +134,7 @@ namespace BerkeleyDB {
private uint ffactor;
/// <summary>
/// The desired density within the hash table. If no value is specified,
- /// the fill factor will be selected dynamically as pages are filled.
+ /// the fill factor is selected dynamically as pages are filled.
/// </summary>
/// <remarks>
/// <para>
@@ -109,7 +148,7 @@ namespace BerkeleyDB {
/// (pagesize - 32) / (average_key_size + average_data_size + 8)
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public uint FillFactor {
@@ -149,12 +188,12 @@ namespace BerkeleyDB {
/// setting <see cref="Duplicates"/> to
/// <see cref="DuplicatesPolicy.SORTED"/>.
/// </para>
- /// <para>
+ /// <para>
/// If no comparison function is specified, the data items are compared
/// lexically, with shorter data items collating before longer data
/// items.
/// </para>
- /// <para>
+ /// <para>
/// If the database already exists when <see cref="HashDatabase.Open"/>
/// is called, the delegate must be the same as that historically used
/// to create the database or corruption can occur.
@@ -162,6 +201,63 @@ namespace BerkeleyDB {
/// </remarks>
public EntryComparisonDelegate DuplicateCompare;
+ internal bool partitionIsSet;
+ private PartitionDelegate partitionFunc;
+ /// <summary>
+ /// Return the application-specified partitioning function.
+ /// </summary>
+ public PartitionDelegate Partition { get { return partitionFunc; } }
+ private DatabaseEntry[] partitionKeys;
+ /// <summary>
+ /// Return an array of type DatabaseEntry where each array entry
+ /// contains the range of keys contained in one of the database's
+ /// partitions. The array contains the information for the entire
+ /// database.
+ /// </summary>
+ public DatabaseEntry[] PartitionKeys { get { return partitionKeys; } }
+ private uint nparts;
+ /// <summary>
+ /// Return the number of partitions to create.
+ /// </summary>
+ public uint NParts { get { return nparts; } }
+ private bool SetPartition(uint parts, DatabaseEntry[] partKeys,
+ PartitionDelegate partFunc) {
+ partitionIsSet = true;
+ nparts = parts;
+ partitionKeys = partKeys;
+ partitionFunc = partFunc;
+ if (nparts < 2)
+ partitionIsSet = false;
+ else if (partitionKeys == null && partitionFunc == null)
+ partitionIsSet = false;
+ return partitionIsSet;
+ }
+ /// <summary>
+ /// Enable database partitioning using the specified partition keys.
+ /// Return true if partitioning is successfully enabled; otherwise
+ /// return false.
+ /// <param name="keys">
+ /// An array of DatabaseEntry where each array entry defines the range
+ /// of key values to be stored in each partition
+ /// </param>
+ /// </summary>
+ public bool SetPartitionByKeys(DatabaseEntry[] keys) {
+ uint parts = (keys == null ? 0 : ((uint)keys.Length + 1));
+ return (SetPartition(parts, keys, null));
+ }
+ /// <summary>
+ /// Enable database partitioning using the specified number of
+ /// partitions and partition function.
+ /// Return true if the specified number of partitions are successfully
+ /// enabled; otherwise return false.
+ /// <param name="parts">The number of partitions to create</param>
+ /// <param name="partFunc">The name of partitioning function</param>
+ /// </summary>
+ public bool SetPartitionByCallback(
+ uint parts, PartitionDelegate partFunc) {
+ return (SetPartition(parts, null, partFunc));
+ }
+
internal bool nelemIsSet;
private uint nelems;
/// <summary>
@@ -171,12 +267,12 @@ namespace BerkeleyDB {
/// <para>
/// In order for the estimate to be used when creating the database,
/// <see cref="FillFactor"/> must also be set. If the estimate or fill
- /// factor are not set or are set too low, hash tables will still expand
+ /// factor is not set or is set too low, hash tables still expand
/// gracefully as keys are entered, although a slight performance
/// degradation may be noticed.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public uint TableSize {
@@ -191,6 +287,7 @@ namespace BerkeleyDB {
/// Instantiate a new HashDatabaseConfig object
/// </summary>
public HashDatabaseConfig() {
+ blobThresholdIsSet = false;
Duplicates = DuplicatesPolicy.NONE;
HashComparison = null;
fillFactorIsSet = false;
@@ -198,4 +295,4 @@ namespace BerkeleyDB {
Creation = CreatePolicy.NEVER;
}
}
-} \ No newline at end of file
+}
diff --git a/lang/csharp/src/HashStats.cs b/lang/csharp/src/HashStats.cs
index fc00f2a5..0333b90d 100644
--- a/lang/csharp/src/HashStats.cs
+++ b/lang/csharp/src/HashStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -31,7 +31,7 @@ namespace BerkeleyDB {
/// </summary>
public ulong BucketPagesFreeBytes { get { return st.hash_bfree; } }
/// <summary>
- /// Number of dup pages.
+ /// Number of duplicate pages.
/// </summary>
public uint DuplicatePages { get { return st.hash_dup; } }
/// <summary>
@@ -55,6 +55,10 @@ namespace BerkeleyDB {
/// </summary>
public uint MagicNumber { get { return st.hash_magic; } }
/// <summary>
+ /// Number of blob records.
+ /// </summary>
+ public uint nBlobRecords { get { return st.hash_nblobs; } }
+ /// <summary>
/// Number of data items.
/// </summary>
public uint nData { get { return st.hash_ndata; } }
@@ -71,7 +75,7 @@ namespace BerkeleyDB {
/// </summary>
public uint OverflowPages { get { return st.hash_overflows; } }
/// <summary>
- /// Bytes free on ovfl pages.
+ /// Bytes free on overflow pages.
/// </summary>
public ulong OverflowPagesFreeBytes { get { return st.hash_ovfl_free; } }
/// <summary>
@@ -88,4 +92,4 @@ namespace BerkeleyDB {
public uint Version { get { return st.hash_version; } }
}
-} \ No newline at end of file
+}
diff --git a/lang/csharp/src/HeapDatabase.cs b/lang/csharp/src/HeapDatabase.cs
index 0b393842..054fe6f1 100644
--- a/lang/csharp/src/HeapDatabase.cs
+++ b/lang/csharp/src/HeapDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -23,11 +23,17 @@ namespace BerkeleyDB {
private void Config(HeapDatabaseConfig cfg) {
base.Config(cfg);
/*
- * Database.Config calls set_flags, but that doesn't get the Heap
+ * Database.Config calls set_flags, but that does not get the Heap
* specific flags. No harm in calling it again.
*/
db.set_flags(cfg.flags);
+ if (cfg.BlobDir != null && cfg.Env == null)
+ db.set_blob_dir(cfg.BlobDir);
+
+ if (cfg.blobThresholdIsSet)
+ db.set_blob_threshold(cfg.BlobThreshold, 0);
+
if (cfg.maxSizeIsSet)
db.set_heapsize(cfg.MaxSizeGBytes, cfg.MaxSizeBytes);
if (cfg.regionszIsSet)
@@ -47,13 +53,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back up the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -76,15 +82,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back up the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -112,6 +118,44 @@ namespace BerkeleyDB {
#region Properties
/// <summary>
+ /// The path of the directory where blobs are stored.
+ /// </summary>
+ public string BlobDir {
+ get {
+ string dir;
+ db.get_blob_dir(out dir);
+ return dir;
+ }
+ }
+
+ internal string BlobSubDir {
+ get {
+ string dir;
+ db.get_blob_sub_dir(out dir);
+ return dir;
+ }
+ }
+
+ /// <summary>
+ /// The threshold value in bytes beyond which data items are stored as
+ /// blobs.
+ /// <para>
+ /// Any data item that is equal to or larger in size than the
+ /// threshold value is automatically stored as a blob.
+ /// </para>
+ /// <para>
+ /// A value of 0 indicates that blobs are not used by the database.
+ /// </para>
+ /// </summary>
+ public uint BlobThreshold {
+ get {
+ uint ret = 0;
+ db.get_blob_threshold(ref ret);
+ return ret;
+ }
+ }
+
+ /// <summary>
/// The gigabytes component of the maximum on-disk database file size.
/// </summary>
public uint MaxSizeGBytes {
@@ -232,7 +276,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="isoDegree">
/// The level of isolation for database reads.
- /// <see cref="Isolation.DEGREE_ONE"/> will be silently ignored for
+ /// <see cref="Isolation.DEGREE_ONE"/> is silently ignored for
/// databases which did not specify
/// <see cref="DatabaseConfig.ReadUncommitted"/>.
/// </param>
@@ -283,7 +327,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="isoDegree">
/// The level of isolation for database reads.
- /// <see cref="Isolation.DEGREE_ONE"/> will be silently ignored for
+ /// <see cref="Isolation.DEGREE_ONE"/> is silently ignored for
/// databases which did not specify
/// <see cref="DatabaseConfig.ReadUncommitted"/>.
/// </param>
diff --git a/lang/csharp/src/HeapDatabaseConfig.cs b/lang/csharp/src/HeapDatabaseConfig.cs
index 710301b6..43e2ce60 100644
--- a/lang/csharp/src/HeapDatabaseConfig.cs
+++ b/lang/csharp/src/HeapDatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -15,12 +15,52 @@ namespace BerkeleyDB {
/// </summary>
public class HeapDatabaseConfig : DatabaseConfig {
/// <summary>
+ /// The path of the directory where blobs are stored.
+ /// <para>
+ /// If the database is opened within <see cref="DatabaseEnvironment"/>,
+ /// this path setting will be ignored during
+ /// <see cref="HeapDatabase.Open"/>. Use
+ /// <see cref="HeapDatabase.BlobDir"/> to identify the current storage
+ /// location of blobs after opening the database.
+ /// </para>
+ /// </summary>
+ public string BlobDir;
+
+ internal bool blobThresholdIsSet;
+ private uint blobThreshold;
+ /// <summary>
+ /// The size in bytes which is used to determine when a data item
+ /// will be stored as a blob.
+ /// <para>
+ /// Any data item that is equal to or larger in size than the
+ /// threshold value is automatically stored as a blob.
+ /// </para>
+ /// <para>
+ /// If the threshold value is 0, blobs are never used by the
+ /// database.
+ /// </para>
+ /// <para>
+ /// It is illegal to enable blob support in the database which is configured
+ /// as in-memory database or with chksum, encryption, duplicates,
+ /// sorted duplicates, compression, multiversion concurrency control
+ /// and transactional read operations with degree 1 isolation.
+ /// </para>
+ /// </summary>
+ public uint BlobThreshold {
+ get { return blobThreshold; }
+ set {
+ blobThresholdIsSet = true;
+ blobThreshold = value;
+ }
+ }
+
+ /// <summary>
/// The policy for how to handle database creation.
/// </summary>
/// <remarks>
/// If the database does not already exist and
/// <see cref="CreatePolicy.NEVER"/> is set,
- /// <see cref="HeapDatabase.Open"/> will fail.
+ /// <see cref="HeapDatabase.Open"/> fails.
/// </remarks>
public CreatePolicy Creation;
internal new uint openFlags {
@@ -43,23 +83,20 @@ namespace BerkeleyDB {
/// </summary>
public uint MaxSizeBytes { get { return _bytes; } }
/// <summary>
- /// Set the maximum on-disk database file size used by the database. If
- /// this value is never set, the database's file size can grow without
- /// bound. If this value is set, then the heap file can never grow
- /// larger than the limit defined by this method. In that case, attempts
- /// to update or create records in a database that has reached its
- /// maximum size will throw a <see cref="HeapFullException"/>.
+ /// Set the maximum on-disk database file size used by the database. Attempts
+ /// to update or create records in a database that have reached this file size
+ /// limit throw a <see cref="HeapFullException"/>. If this value is not set,
+ /// the database file size can grow infinitely.
/// </summary>
///<remarks>
- /// The size specified to this method must be at least three times the
- /// database page size. That is, the database must contain at least
+ /// The size specified must be at least three times the
+ /// database page size. The database must contain at least
/// three database pages. You can set the database page size using
/// <see cref="DatabaseConfig.PageSize"/>.
///
/// If this value is set for an existing database, the size specified
- /// here must match the size used to create the database. Note, however,
- /// that specifying an incorrect size will not result in an error
- /// until the database is opened.
+ /// here must match the size used to create the database. Specifying an
+ /// incorrect size does not result in an error until the database is opened.
/// </remarks>
/// <param name="GBytes">The size of the database is set to GBytes
/// gigabytes plus Bytes.</param>
@@ -75,15 +112,15 @@ namespace BerkeleyDB {
internal bool regionszIsSet;
/// <summary>
/// The number of pages in a region of the database. If this value is
- /// never set, the default region size for the database's page size will
- /// be used. You can set the database page size using
+ /// never set, the default region size for the database's page size is
+ /// used. You can set the database page size using
/// <see cref="DatabaseConfig.PageSize"/>.
///
- /// If the database already exists, this value will be ignored. If the
+ /// If the database already exists, this value is ignored. If the
/// specified region size is larger than the maximum region size for the
- /// database's page size, an error will be returned when
+ /// database's page size, an error is returned when
/// <see cref="Database.Open"/> is called. The maximum allowable region
- /// size will be included in the error message.
+ /// size is included in the error message.
/// </summary>
public uint RegionSize {
get { return _regionsz; }
@@ -96,6 +133,7 @@ namespace BerkeleyDB {
/// Instantiate a new HeapDatabaseConfig object
/// </summary>
public HeapDatabaseConfig() {
+ blobThresholdIsSet = false;
Creation = CreatePolicy.NEVER;
}
}
diff --git a/lang/csharp/src/HeapRecordId.cs b/lang/csharp/src/HeapRecordId.cs
index eb77903f..df5253db 100644
--- a/lang/csharp/src/HeapRecordId.cs
+++ b/lang/csharp/src/HeapRecordId.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/HeapStats.cs b/lang/csharp/src/HeapStats.cs
index 50076df6..5b6a9735 100644
--- a/lang/csharp/src/HeapStats.cs
+++ b/lang/csharp/src/HeapStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -27,6 +27,10 @@ namespace BerkeleyDB {
/// </summary>
public uint MetadataFlags { get { return st.heap_metaflags; } }
/// <summary>
+ /// Number of blob records.
+ /// </summary>
+ public uint nBlobRecords { get { return st.heap_nblobs; } }
+ /// <summary>
/// The number of pages in the database.
/// </summary>
public uint nPages { get { return st.heap_pagecnt; } }
diff --git a/lang/csharp/src/IBackup.cs b/lang/csharp/src/IBackup.cs
index 264179a3..54d423ea 100644
--- a/lang/csharp/src/IBackup.cs
+++ b/lang/csharp/src/IBackup.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/Internal/DB.cs b/lang/csharp/src/Internal/DB.cs
index f95a7a4b..9e9a09a9 100644
--- a/lang/csharp/src/Internal/DB.cs
+++ b/lang/csharp/src/Internal/DB.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
@@ -34,6 +34,14 @@ internal class DB : IDisposable {
}
}
+ internal DatabaseEntry[] get_partition_keys() {
+ uint count = 0;
+ int err = 0;
+ uint size = 0;
+ DatabaseEntry[] ret = get_partition_keys(ref count, ref size, ref err);
+ DatabaseException.ThrowException(err);
+ return ret;
+ }
internal DBC cursor(DB_TXN txn, uint flags) {
int err = 0;
DBC ret = cursor(txn, flags, ref err);
@@ -81,6 +89,22 @@ internal class DB : IDisposable {
return ret;
}
+ internal int get_blob_dir(out string dir) {
+ int ret;
+ IntPtr dirp;
+ ret = get_blob_dir(out dirp);
+ dir = Marshal.PtrToStringAnsi(dirp);
+ return ret;
+ }
+
+ internal int get_blob_sub_dir(out string dir) {
+ int ret;
+ IntPtr dirp;
+ ret = get_blob_sub_dir(out dirp);
+ dir = Marshal.PtrToStringAnsi(dirp);
+ return ret;
+ }
+
internal int get_dbname(out string filenamep, out string dbnamep) {
int ret;
IntPtr fp, dp;
@@ -318,6 +342,41 @@ internal class DB : IDisposable {
return ret;
}
+ internal int get_blob_dir(out IntPtr dir) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_get_blob_dir(swigCPtr, out dir);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int set_blob_dir(string dir) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_set_blob_dir(swigCPtr, dir);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int get_blob_sub_dir(out IntPtr dir) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_get_blob_sub_dir(swigCPtr, out dir);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int get_blob_threshold(ref uint bytes) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_get_blob_threshold(swigCPtr, ref bytes);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int set_blob_threshold(uint bytes, uint flags) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_set_blob_threshold(swigCPtr, bytes, flags);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
internal int set_bt_compare(BDB_CompareDelegate callback) {
int ret;
ret = libdb_csharpPINVOKE.DB_set_bt_compare(swigCPtr, callback);
@@ -525,6 +584,45 @@ internal class DB : IDisposable {
return ret;
}
+ internal void set_msgcall(BDB_MsgcallDelegate db_msgcall_fcn) {
+ libdb_csharpPINVOKE.DB_set_msgcall(swigCPtr, db_msgcall_fcn);
+ }
+
+ internal int set_msgfile(string msgfile) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_set_msgfile(swigCPtr, msgfile);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ private DatabaseEntry[] get_partition_keys(ref uint countp, ref uint sizep, ref int err) {
+ IntPtr cPtr = libdb_csharpPINVOKE.DB_get_partition_keys(swigCPtr, ref countp, ref sizep, ref err);
+ if (cPtr == IntPtr.Zero)
+ return null;
+
+ DatabaseEntry[] ret = new DatabaseEntry[countp - 1];
+ IntPtr val;
+ for (int i = 0; i < (countp - 1); i++) {
+ val = new IntPtr((IntPtr.Size == 4 ? cPtr.ToInt32() : cPtr.ToInt64()) + i * sizep);
+ ret[i] = DatabaseEntry.fromDBT(new DBT(val, false));
+ }
+ return ret;
+}
+
+ internal int get_partition_parts(ref uint parts) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_get_partition_parts(swigCPtr, ref parts);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int set_partition(uint parts, IntPtr[] keys, BDB_PartitionDelegate partition) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_set_partition(swigCPtr, parts, keys, partition);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
internal int get_priority(ref uint flags) {
int ret;
ret = libdb_csharpPINVOKE.DB_get_priority(swigCPtr, ref flags);
diff --git a/lang/csharp/src/Internal/DBC.cs b/lang/csharp/src/Internal/DBC.cs
index 25ed7ee4..c32d5453 100644
--- a/lang/csharp/src/Internal/DBC.cs
+++ b/lang/csharp/src/Internal/DBC.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
@@ -47,6 +47,12 @@ internal class DBC : IDisposable {
DatabaseException.ThrowException(err);
return ret;
}
+ internal DB_STREAM db_stream(uint flags) {
+ int err = 0;
+ DB_STREAM ret = db_stream(flags, ref err);
+ DatabaseException.ThrowException(err);
+ return ret;
+ }
internal int close() {
int ret = libdb_csharpPINVOKE.DBC_close(swigCPtr);
@@ -72,6 +78,12 @@ internal class DBC : IDisposable {
return ret;
}
+ private DB_STREAM db_stream(uint flags, ref int err) {
+ IntPtr cPtr = libdb_csharpPINVOKE.DBC_db_stream(swigCPtr, flags, ref err);
+ DB_STREAM ret = (cPtr == IntPtr.Zero) ? null : new DB_STREAM(cPtr, false);
+ return ret;
+ }
+
internal int del(uint flags) {
int ret;
ret = libdb_csharpPINVOKE.DBC_del(swigCPtr, flags);
diff --git a/lang/csharp/src/Internal/DBT.cs b/lang/csharp/src/Internal/DBT.cs
index 025fa268..116fc457 100644
--- a/lang/csharp/src/Internal/DBT.cs
+++ b/lang/csharp/src/Internal/DBT.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DBTYPE.cs b/lang/csharp/src/Internal/DBTYPE.cs
index c3910f18..a2a257d8 100644
--- a/lang/csharp/src/Internal/DBTYPE.cs
+++ b/lang/csharp/src/Internal/DBTYPE.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_CHANNEL.cs b/lang/csharp/src/Internal/DB_CHANNEL.cs
index e1fafc5d..b1d8abd3 100644
--- a/lang/csharp/src/Internal/DB_CHANNEL.cs
+++ b/lang/csharp/src/Internal/DB_CHANNEL.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_COMPACT.cs b/lang/csharp/src/Internal/DB_COMPACT.cs
index 636ad761..e1ef45b0 100644
--- a/lang/csharp/src/Internal/DB_COMPACT.cs
+++ b/lang/csharp/src/Internal/DB_COMPACT.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_ENV.cs b/lang/csharp/src/Internal/DB_ENV.cs
index 4f3811f2..056e36b7 100644
--- a/lang/csharp/src/Internal/DB_ENV.cs
+++ b/lang/csharp/src/Internal/DB_ENV.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
@@ -214,6 +214,13 @@ internal class DB_ENV : IDisposable {
return ret;
}
+ internal int get_blob_dir(out string dir) {
+ int ret;
+ IntPtr dirp;
+ ret = get_blob_dir(out dirp);
+ dir = Marshal.PtrToStringAnsi(dirp);
+ return ret;
+ }
internal int get_home(out string file) {
int ret;
IntPtr fp;
@@ -645,6 +652,20 @@ internal class DB_ENV : IDisposable {
return ret;
}
+ internal int repmgr_get_incoming_queue_max(ref uint gbytes, ref uint bytes) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_ENV_repmgr_get_incoming_queue_max(swigCPtr, ref gbytes, ref bytes);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int repmgr_set_incoming_queue_max(uint gbytes, uint bytes) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_ENV_repmgr_set_incoming_queue_max(swigCPtr, gbytes, bytes);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
internal DB_CHANNEL repmgr_channel(int eid, uint flags, ref int err) {
IntPtr cPtr = libdb_csharpPINVOKE.DB_ENV_repmgr_channel(swigCPtr, eid, flags, ref err);
DB_CHANNEL ret = (cPtr == IntPtr.Zero) ? null : new DB_CHANNEL(cPtr, false);
@@ -873,6 +894,13 @@ internal class DB_ENV : IDisposable {
return ret;
}
+ internal int rep_set_view(BDB_ReplicationViewDelegate f_repview) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_ENV_rep_set_view(swigCPtr, f_repview);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
internal int set_backup_callbacks(BDB_BackupOpenDelegate open_func, BDB_BackupWriteDelegate write_func, BDB_BackupCloseDelegate close_func) {
int ret;
ret = libdb_csharpPINVOKE.DB_ENV_set_backup_callbacks(swigCPtr, open_func, write_func, close_func);
@@ -894,6 +922,34 @@ internal class DB_ENV : IDisposable {
return ret;
}
+ internal int get_blob_dir(out IntPtr dirp) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_ENV_get_blob_dir(swigCPtr, out dirp);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int set_blob_dir(string dir) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_ENV_set_blob_dir(swigCPtr, dir);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int get_blob_threshold(ref uint bytes) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_ENV_get_blob_threshold(swigCPtr, ref bytes);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int set_blob_threshold(uint bytes, uint flags) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_ENV_set_blob_threshold(swigCPtr, bytes, flags);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
internal int get_cachesize(ref uint gbytes, ref uint bytes, ref int ncache) {
int ret;
ret = libdb_csharpPINVOKE.DB_ENV_get_cachesize(swigCPtr, ref gbytes, ref bytes, ref ncache);
@@ -997,7 +1053,7 @@ internal class DB_ENV : IDisposable {
return ret;
}
- internal int get_intermediate_dir_mode(out IntPtr mode) {
+ private int get_intermediate_dir_mode(out IntPtr mode) {
int ret;
ret = libdb_csharpPINVOKE.DB_ENV_get_intermediate_dir_mode(swigCPtr, out mode);
DatabaseException.ThrowException(ret);
@@ -1284,6 +1340,17 @@ internal class DB_ENV : IDisposable {
return ret;
}
+ internal void set_msgcall(BDB_MsgcallDelegate db_msgcall_fcn) {
+ libdb_csharpPINVOKE.DB_ENV_set_msgcall(swigCPtr, db_msgcall_fcn);
+ }
+
+ internal int set_msgfile(string msgfile) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_ENV_set_msgfile(swigCPtr, msgfile);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
internal int get_thread_count(ref uint count) {
int ret;
ret = libdb_csharpPINVOKE.DB_ENV_get_thread_count(swigCPtr, ref count);
diff --git a/lang/csharp/src/Internal/DB_KEY_RANGE.cs b/lang/csharp/src/Internal/DB_KEY_RANGE.cs
index 7e5d3b92..5e172ea3 100644
--- a/lang/csharp/src/Internal/DB_KEY_RANGE.cs
+++ b/lang/csharp/src/Internal/DB_KEY_RANGE.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_LOCK.cs b/lang/csharp/src/Internal/DB_LOCK.cs
index aa28d042..78911404 100644
--- a/lang/csharp/src/Internal/DB_LOCK.cs
+++ b/lang/csharp/src/Internal/DB_LOCK.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_LOCKREQ.cs b/lang/csharp/src/Internal/DB_LOCKREQ.cs
index 2137b220..a8d65455 100644
--- a/lang/csharp/src/Internal/DB_LOCKREQ.cs
+++ b/lang/csharp/src/Internal/DB_LOCKREQ.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_LSN.cs b/lang/csharp/src/Internal/DB_LSN.cs
index 640d7e45..375c1135 100644
--- a/lang/csharp/src/Internal/DB_LSN.cs
+++ b/lang/csharp/src/Internal/DB_LSN.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_PREPLIST.cs b/lang/csharp/src/Internal/DB_PREPLIST.cs
index 5d474776..75018852 100644
--- a/lang/csharp/src/Internal/DB_PREPLIST.cs
+++ b/lang/csharp/src/Internal/DB_PREPLIST.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_REPMGR_SITE.cs b/lang/csharp/src/Internal/DB_REPMGR_SITE.cs
index 3794330a..522b2c71 100644
--- a/lang/csharp/src/Internal/DB_REPMGR_SITE.cs
+++ b/lang/csharp/src/Internal/DB_REPMGR_SITE.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_SEQUENCE.cs b/lang/csharp/src/Internal/DB_SEQUENCE.cs
index a1756680..6702d6ae 100644
--- a/lang/csharp/src/Internal/DB_SEQUENCE.cs
+++ b/lang/csharp/src/Internal/DB_SEQUENCE.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
@@ -56,7 +56,7 @@ internal class DB_SEQUENCE : IDisposable {
return ret;
}
- internal int get(DB_TXN txn, int delta, ref Int64 retp, uint flags) {
+ internal int get(DB_TXN txn, uint delta, ref Int64 retp, uint flags) {
int ret;
ret = libdb_csharpPINVOKE.DB_SEQUENCE_get(swigCPtr, DB_TXN.getCPtr(txn), delta, ref retp, flags);
DatabaseException.ThrowException(ret);
@@ -112,14 +112,14 @@ internal class DB_SEQUENCE : IDisposable {
return ret;
}
- internal int get_cachesize(ref int size) {
+ internal int get_cachesize(ref uint size) {
int ret;
ret = libdb_csharpPINVOKE.DB_SEQUENCE_get_cachesize(swigCPtr, ref size);
DatabaseException.ThrowException(ret);
return ret;
}
- internal int set_cachesize(int size) {
+ internal int set_cachesize(uint size) {
int ret;
ret = libdb_csharpPINVOKE.DB_SEQUENCE_set_cachesize(swigCPtr, size);
DatabaseException.ThrowException(ret);
diff --git a/lang/csharp/src/Internal/DB_SITE.cs b/lang/csharp/src/Internal/DB_SITE.cs
index afa008bd..ca896da5 100644
--- a/lang/csharp/src/Internal/DB_SITE.cs
+++ b/lang/csharp/src/Internal/DB_SITE.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_STREAM.cs b/lang/csharp/src/Internal/DB_STREAM.cs
new file mode 100644
index 00000000..fef9da68
--- /dev/null
+++ b/lang/csharp/src/Internal/DB_STREAM.cs
@@ -0,0 +1,88 @@
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.12
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+namespace BerkeleyDB.Internal {
+
+using System;
+using System.Runtime.InteropServices;
+
+internal class DB_STREAM : IDisposable {
+ private HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal DB_STREAM(IntPtr cPtr, bool cMemoryOwn) {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new HandleRef(this, cPtr);
+ }
+
+ internal static HandleRef getCPtr(DB_STREAM obj) {
+ return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ ~DB_STREAM() {
+ Dispose();
+ }
+
+ public virtual void Dispose() {
+ lock(this) {
+ if (swigCPtr.Handle != IntPtr.Zero) {
+ if (swigCMemOwn) {
+ swigCMemOwn = false;
+ libdb_csharpPINVOKE.delete_DB_STREAM(swigCPtr);
+ }
+ swigCPtr = new HandleRef(null, IntPtr.Zero);
+ }
+ GC.SuppressFinalize(this);
+ }
+ }
+
+ internal int close(uint flags) {
+ int ret = libdb_csharpPINVOKE.DB_STREAM_close(swigCPtr, flags);
+ if (ret == 0)
+ /* Close is a db handle destructor. Reflect that in the wrapper class. */
+ swigCPtr = new HandleRef(null, IntPtr.Zero);
+ else
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int read(DatabaseEntry data, Int64 offset, uint size, uint flags) {
+ try {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_STREAM_read(swigCPtr, DBT.getCPtr(DatabaseEntry.getDBT(data)), offset, size, flags);
+ DatabaseException.ThrowException(ret);
+ return ret;
+} finally {
+ GC.KeepAlive(data);
+ }
+ }
+
+ internal int size(ref Int64 size, uint flags) {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_STREAM_size(swigCPtr, ref size, flags);
+ DatabaseException.ThrowException(ret);
+ return ret;
+}
+
+ internal int write(DatabaseEntry data, Int64 offset, uint flags) {
+ try {
+ int ret;
+ ret = libdb_csharpPINVOKE.DB_STREAM_write(swigCPtr, DBT.getCPtr(DatabaseEntry.getDBT(data)), offset, flags);
+ DatabaseException.ThrowException(ret);
+ return ret;
+} finally {
+ GC.KeepAlive(data);
+ }
+ }
+
+ internal DB_STREAM() : this(libdb_csharpPINVOKE.new_DB_STREAM(), true) {
+ }
+
+}
+
+}
diff --git a/lang/csharp/src/Internal/DB_TXN.cs b/lang/csharp/src/Internal/DB_TXN.cs
index a74eaf8a..4ad60894 100644
--- a/lang/csharp/src/Internal/DB_TXN.cs
+++ b/lang/csharp/src/Internal/DB_TXN.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DB_TXN_TOKEN.cs b/lang/csharp/src/Internal/DB_TXN_TOKEN.cs
index 6e0a1064..0fa0bfaa 100644
--- a/lang/csharp/src/Internal/DB_TXN_TOKEN.cs
+++ b/lang/csharp/src/Internal/DB_TXN_TOKEN.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/DbConstants.cs b/lang/csharp/src/Internal/DbConstants.cs
index 988323dc..8bc47961 100644
--- a/lang/csharp/src/Internal/DbConstants.cs
+++ b/lang/csharp/src/Internal/DbConstants.cs
@@ -33,15 +33,16 @@ namespace BerkeleyDB.Internal {
internal const uint DB_CREATE = 0x00000001;
internal const uint DB_CURRENT = 6;
internal const uint DB_CURSOR_BULK = 0x00000001;
- internal const uint DB_DBT_APPMALLOC = 0x001;
- internal const uint DB_DBT_BULK = 0x002;
- internal const uint DB_DBT_MALLOC = 0x010;
- internal const uint DB_DBT_MULTIPLE = 0x020;
- internal const uint DB_DBT_PARTIAL = 0x040;
- internal const uint DB_DBT_READONLY = 0x100;
- internal const uint DB_DBT_REALLOC = 0x080;
- internal const uint DB_DBT_USERCOPY = 0x400;
- internal const uint DB_DBT_USERMEM = 0x800;
+ internal const uint DB_DBT_APPMALLOC = 0x0001;
+ internal const uint DB_DBT_BLOB = 0x1000;
+ internal const uint DB_DBT_BULK = 0x0002;
+ internal const uint DB_DBT_MALLOC = 0x0010;
+ internal const uint DB_DBT_MULTIPLE = 0x0020;
+ internal const uint DB_DBT_PARTIAL = 0x0040;
+ internal const uint DB_DBT_READONLY = 0x0100;
+ internal const uint DB_DBT_REALLOC = 0x0080;
+ internal const uint DB_DBT_USERCOPY = 0x0400;
+ internal const uint DB_DBT_USERMEM = 0x0800;
internal const uint DB_DIRECT_DB = 0x00000200;
internal const int DB_DONOTINDEX = -30998;
internal const uint DB_DSYNC_DB = 0x00000400;
@@ -53,30 +54,33 @@ namespace BerkeleyDB.Internal {
internal const uint DB_ENCRYPT = 0x00000001;
internal const uint DB_ENCRYPT_AES = 0x00000001;
internal const uint DB_EVENT_PANIC = 0;
- internal const uint DB_EVENT_REP_CLIENT = 3;
- internal const uint DB_EVENT_REP_CONNECT_BROKEN = 4;
- internal const uint DB_EVENT_REP_CONNECT_ESTD = 5;
- internal const uint DB_EVENT_REP_CONNECT_TRY_FAILED = 6;
- internal const uint DB_EVENT_REP_DUPMASTER = 7;
- internal const uint DB_EVENT_REP_ELECTED = 8;
- internal const uint DB_EVENT_REP_ELECTION_FAILED = 9;
- internal const uint DB_EVENT_REP_INIT_DONE = 10;
- internal const uint DB_EVENT_REP_JOIN_FAILURE = 11;
- internal const uint DB_EVENT_REP_LOCAL_SITE_REMOVED = 12;
- internal const uint DB_EVENT_REP_MASTER = 13;
- internal const uint DB_EVENT_REP_MASTER_FAILURE = 14;
- internal const uint DB_EVENT_REP_NEWMASTER = 15;
- internal const uint DB_EVENT_REP_PERM_FAILED = 16;
- internal const uint DB_EVENT_REP_SITE_ADDED = 17;
- internal const uint DB_EVENT_REP_SITE_REMOVED = 18;
- internal const uint DB_EVENT_REP_STARTUPDONE = 19;
- internal const uint DB_EVENT_WRITE_FAILED = 21;
+ internal const uint DB_EVENT_REP_AUTOTAKEOVER_FAILED = 3;
+ internal const uint DB_EVENT_REP_CLIENT = 4;
+ internal const uint DB_EVENT_REP_CONNECT_BROKEN = 5;
+ internal const uint DB_EVENT_REP_CONNECT_ESTD = 6;
+ internal const uint DB_EVENT_REP_CONNECT_TRY_FAILED = 7;
+ internal const uint DB_EVENT_REP_DUPMASTER = 8;
+ internal const uint DB_EVENT_REP_ELECTED = 9;
+ internal const uint DB_EVENT_REP_ELECTION_FAILED = 10;
+ internal const uint DB_EVENT_REP_INIT_DONE = 11;
+ internal const uint DB_EVENT_REP_INQUEUE_FULL = 12;
+ internal const uint DB_EVENT_REP_JOIN_FAILURE = 13;
+ internal const uint DB_EVENT_REP_LOCAL_SITE_REMOVED = 14;
+ internal const uint DB_EVENT_REP_MASTER = 15;
+ internal const uint DB_EVENT_REP_MASTER_FAILURE = 16;
+ internal const uint DB_EVENT_REP_NEWMASTER = 17;
+ internal const uint DB_EVENT_REP_PERM_FAILED = 18;
+ internal const uint DB_EVENT_REP_SITE_ADDED = 19;
+ internal const uint DB_EVENT_REP_SITE_REMOVED = 20;
+ internal const uint DB_EVENT_REP_STARTUPDONE = 21;
+ internal const uint DB_EVENT_WRITE_FAILED = 23;
internal const uint DB_EXCL = 0x00000004;
internal const uint DB_FAST_STAT = 0x00000001;
internal const uint DB_FIRST = 7;
internal const uint DB_FLUSH = 0x00000002;
internal const uint DB_FORCE = 0x00000001;
internal const uint DB_FORCESYNC = 0x00000001;
+ internal const uint DB_FORCESYNCENV = 0x00000002;
internal const uint DB_FOREIGN_ABORT = 0x00000001;
internal const uint DB_FOREIGN_CASCADE = 0x00000002;
internal const int DB_FOREIGN_CONFLICT = -30997;
@@ -136,17 +140,20 @@ namespace BerkeleyDB.Internal {
internal const uint DB_LOCK_WRITE = 2;
internal const uint DB_LOCK_YOUNGEST = 9;
internal const uint DB_LOG_AUTO_REMOVE = 0x00000001;
+ internal const uint DB_LOG_BLOB = 0x00000002;
internal const int DB_LOG_BUFFER_FULL = -30991;
- internal const uint DB_LOG_DIRECT = 0x00000002;
- internal const uint DB_LOG_DSYNC = 0x00000004;
- internal const uint DB_LOG_IN_MEMORY = 0x00000008;
- internal const uint DB_LOG_ZERO = 0x00000010;
+ internal const uint DB_LOG_DIRECT = 0x00000004;
+ internal const uint DB_LOG_DSYNC = 0x00000008;
+ internal const uint DB_LOG_IN_MEMORY = 0x00000010;
+ internal const uint DB_LOG_NOSYNC = 0x00000020;
+ internal const uint DB_LOG_ZERO = 0x00000040;
internal const uint DB_MEM_LOCK = 1;
internal const uint DB_MEM_LOCKOBJECT = 2;
internal const uint DB_MEM_LOCKER = 3;
internal const uint DB_MEM_LOGID = 4;
internal const uint DB_MEM_TRANSACTION = 5;
internal const uint DB_MEM_THREAD = 6;
+ internal const int DB_META_CHKSUM_FAIL = -30968;
internal const uint DB_MPOOL_NOFILE = 0x00000001;
internal const uint DB_MPOOL_UNLINK = 0x00000002;
internal const uint DB_MULTIPLE = 0x00000800;
@@ -202,20 +209,24 @@ namespace BerkeleyDB.Internal {
internal const int DB_REPMGR_ACKS_QUORUM = 7;
internal const uint DB_REPMGR_CONF_2SITE_STRICT = 0x00000001;
internal const uint DB_REPMGR_CONF_ELECTIONS = 0x00000002;
+ internal const uint DB_REPMGR_CONF_PREFMAS_CLIENT = 0x00000004;
+ internal const uint DB_REPMGR_CONF_PREFMAS_MASTER = 0x00000008;
internal const uint DB_REPMGR_CONNECTED = 1;
internal const uint DB_REPMGR_DISCONNECTED = 2;
internal const uint DB_REPMGR_NEED_RESPONSE = 0x00000001;
+ internal const uint DB_REPMGR_ISPEER = 0x01;
+ internal const uint DB_REPMGR_ISVIEW = 0x02;
internal const uint DB_REPMGR_PEER = 0x00000010;
internal const int DB_REP_ACK_TIMEOUT = 1;
internal const uint DB_REP_ANYWHERE = 0x00000001;
internal const int DB_REP_CHECKPOINT_DELAY = 2;
internal const uint DB_REP_CLIENT = 0x00000001;
- internal const uint DB_REP_CONF_AUTOINIT = 0x00000004;
- internal const uint DB_REP_CONF_BULK = 0x00000010;
- internal const uint DB_REP_CONF_DELAYCLIENT = 0x00000020;
- internal const uint DB_REP_CONF_INMEM = 0x00000040;
- internal const uint DB_REP_CONF_LEASE = 0x00000080;
- internal const uint DB_REP_CONF_NOWAIT = 0x00000100;
+ internal const uint DB_REP_CONF_AUTOINIT = 0x00000010;
+ internal const uint DB_REP_CONF_BULK = 0x00000040;
+ internal const uint DB_REP_CONF_DELAYCLIENT = 0x00000080;
+ internal const uint DB_REP_CONF_INMEM = 0x00000200;
+ internal const uint DB_REP_CONF_LEASE = 0x00000400;
+ internal const uint DB_REP_CONF_NOWAIT = 0x00000800;
internal const int DB_REP_CONNECTION_RETRY = 3;
internal const uint DB_REP_DEFAULT_PRIORITY = 100;
internal const int DB_REP_DUPMASTER = -30985;
@@ -255,6 +266,7 @@ namespace BerkeleyDB.Internal {
internal const uint DB_SET_TXN_TIMEOUT = 0x00000002;
internal const uint DB_SNAPSHOT = 0x00000200;
internal const uint DB_STAT_ALL = 0x00000004;
+ internal const uint DB_STAT_ALLOC = 0x00000008;
internal const uint DB_STAT_CLEAR = 0x00000001;
internal const uint DB_STAT_LOCK_CONF = 0x00000010;
internal const uint DB_STAT_LOCK_LOCKERS = 0x00000020;
@@ -262,11 +274,14 @@ namespace BerkeleyDB.Internal {
internal const uint DB_STAT_LOCK_PARAMS = 0x00000080;
internal const uint DB_STAT_MEMP_HASH = 0x00000010;
internal const uint DB_STAT_SUBSYSTEM = 0x00000002;
+ internal const uint DB_STREAM_READ = 0x00000001;
+ internal const uint DB_STREAM_SYNC_WRITE = 0x00000004;
+ internal const uint DB_STREAM_WRITE = 0x00000002;
internal const uint DB_SYSTEM_MEM = 0x00080000;
internal const uint DB_THREAD = 0x00000020;
internal const int DB_TIMEOUT = -30971;
internal const uint DB_TIME_NOTGRANTED = 0x00040000;
- internal const uint DB_TRUNCATE = 0x00020000;
+ internal const uint DB_TRUNCATE = 0x00040000;
internal const uint DB_TXN_ABORT = 0;
internal const uint DB_TXN_APPLY = 1;
internal const uint DB_TXN_BACKWARD_ROLL = 3;
@@ -289,34 +304,34 @@ namespace BerkeleyDB.Internal {
internal const uint DB_VERB_DEADLOCK = 0x00000002;
internal const uint DB_VERB_FILEOPS = 0x00000004;
internal const uint DB_VERB_FILEOPS_ALL = 0x00000008;
- internal const uint DB_VERB_RECOVERY = 0x00000010;
- internal const uint DB_VERB_REGISTER = 0x00000020;
- internal const uint DB_VERB_REPLICATION = 0x00000040;
- internal const uint DB_VERB_REPMGR_CONNFAIL = 0x00000080;
- internal const uint DB_VERB_REPMGR_MISC = 0x00000100;
- internal const uint DB_VERB_REP_ELECT = 0x00000200;
- internal const uint DB_VERB_REP_LEASE = 0x00000400;
- internal const uint DB_VERB_REP_MISC = 0x00000800;
- internal const uint DB_VERB_REP_MSGS = 0x00001000;
- internal const uint DB_VERB_REP_SYNC = 0x00002000;
- internal const uint DB_VERB_REP_SYSTEM = 0x00004000;
- internal const uint DB_VERB_REP_TEST = 0x00008000;
- internal const uint DB_VERB_WAITSFOR = 0x00010000;
+ internal const uint DB_VERB_RECOVERY = 0x00000020;
+ internal const uint DB_VERB_REGISTER = 0x00000040;
+ internal const uint DB_VERB_REPLICATION = 0x00000080;
+ internal const uint DB_VERB_REPMGR_CONNFAIL = 0x00000100;
+ internal const uint DB_VERB_REPMGR_MISC = 0x00000200;
+ internal const uint DB_VERB_REP_ELECT = 0x00000400;
+ internal const uint DB_VERB_REP_LEASE = 0x00000800;
+ internal const uint DB_VERB_REP_MISC = 0x00001000;
+ internal const uint DB_VERB_REP_MSGS = 0x00002000;
+ internal const uint DB_VERB_REP_SYNC = 0x00004000;
+ internal const uint DB_VERB_REP_SYSTEM = 0x00008000;
+ internal const uint DB_VERB_REP_TEST = 0x00010000;
+ internal const uint DB_VERB_WAITSFOR = 0x00020000;
internal const uint DB_VERIFY = 0x00000002;
internal const int DB_VERIFY_BAD = -30970;
- internal const uint DB_VERSION_FAMILY = 11;
- internal const string DB_VERSION_FAMILY_STR = "11";
- internal const uint DB_VERSION_RELEASE = 2;
- internal const string DB_VERSION_RELEASE_STR = "2";
- internal const uint DB_VERSION_MAJOR = 5;
- internal const string DB_VERSION_MAJOR_STR = "5";
- internal const uint DB_VERSION_MINOR = 3;
- internal const string DB_VERSION_MINOR_STR = "3";
+ internal const uint DB_VERSION_FAMILY = 12;
+ internal const string DB_VERSION_FAMILY_STR = "12";
+ internal const uint DB_VERSION_RELEASE = 1;
+ internal const string DB_VERSION_RELEASE_STR = "1";
+ internal const uint DB_VERSION_MAJOR = 6;
+ internal const string DB_VERSION_MAJOR_STR = "6";
+ internal const uint DB_VERSION_MINOR = 1;
+ internal const string DB_VERSION_MINOR_STR = "1";
internal const int DB_VERSION_MISMATCH = -30969;
- internal const uint DB_VERSION_PATCH = 21;
- internal const string DB_VERSION_PATCH_STR = "21";
- internal const string DB_VERSION_STRING = "Berkeley DB 5.3.21: May 11 2012 ";
- internal const string DB_VERSION_FULL_STRING = "Berkeley DB 11g Release 2 library version 11.2.5.3.21: May 11 2012 ";
+ internal const uint DB_VERSION_PATCH = 23;
+ internal const string DB_VERSION_PATCH_STR = "23";
+ internal const string DB_VERSION_STRING = "Berkeley DB 6.1.23: February 17 2015 ";
+ internal const string DB_VERSION_FULL_STRING = "Berkeley DB 12c Release 1 library version 12.1.6.1.23: February 17 2015 ";
internal const uint DB_WRITECURSOR = 0x00000010;
internal const uint DB_YIELDCPU = 0x00080000;
internal const uint DB_USERCOPY_GETDATA = 0x00000001;
diff --git a/lang/csharp/src/Internal/Delegates.cs b/lang/csharp/src/Internal/Delegates.cs
index 0b9593ed..30861de3 100644
--- a/lang/csharp/src/Internal/Delegates.cs
+++ b/lang/csharp/src/Internal/Delegates.cs
@@ -17,7 +17,7 @@ namespace BerkeleyDB.Internal {
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate int BDB_BackupWriteDelegate(IntPtr dbenv, uint off_gbytes, uint off_bytes, uint size, IntPtr buf, IntPtr handle);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate int BDB_CompareDelegate(IntPtr db, IntPtr dbt1, IntPtr dbt2);
+ internal delegate int BDB_CompareDelegate(IntPtr db, IntPtr dbt1, IntPtr dbt2, IntPtr locp);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate uint BDB_PrefixCompareDelegate(IntPtr db, IntPtr dbt1, IntPtr dbt2);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
@@ -41,6 +41,12 @@ namespace BerkeleyDB.Internal {
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void BDB_MessageDispatchDelegate(IntPtr dbenv, IntPtr channel, IntPtr request, uint nrequest, uint cb_flags);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate void BDB_MsgcallDelegate(IntPtr env, string msg);
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate int BDB_ReplicationViewDelegate(IntPtr dbenv, string name, ref int result, uint flags);
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate uint BDB_PartitionDelegate(IntPtr db, IntPtr key);
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate int BDB_RepTransportDelegate(IntPtr dbenv, IntPtr control, IntPtr rec, IntPtr lsnp, int envid, uint flags);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void BDB_ThreadIDDelegate(IntPtr dbenv, IntPtr pid, IntPtr tid);
diff --git a/lang/csharp/src/Internal/StatStructs.cs b/lang/csharp/src/Internal/StatStructs.cs
index 18730dd3..78a75916 100644
--- a/lang/csharp/src/Internal/StatStructs.cs
+++ b/lang/csharp/src/Internal/StatStructs.cs
@@ -3,7 +3,7 @@
*
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*/
using System;
@@ -12,204 +12,212 @@ using System.Runtime.InteropServices;
namespace BerkeleyDB.Internal {
[StructLayout(LayoutKind.Sequential)]
internal struct BTreeStatStruct {
- internal uint bt_magic;
- internal uint bt_version;
- internal uint bt_metaflags;
- internal uint bt_nkeys;
- internal uint bt_ndata;
- internal uint bt_pagecnt;
- internal uint bt_pagesize;
- internal uint bt_minkey;
- internal uint bt_re_len;
- internal uint bt_re_pad;
- internal uint bt_levels;
- internal uint bt_int_pg;
- internal uint bt_leaf_pg;
- internal uint bt_dup_pg;
- internal uint bt_over_pg;
- internal uint bt_empty_pg;
- internal uint bt_free;
- internal ulong bt_int_pgfree;
- internal ulong bt_leaf_pgfree;
- internal ulong bt_dup_pgfree;
- internal ulong bt_over_pgfree;
+ internal uint bt_magic;
+ internal uint bt_version;
+ internal uint bt_metaflags;
+ internal uint bt_nkeys;
+ internal uint bt_ndata;
+ internal uint bt_pagecnt;
+ internal uint bt_pagesize;
+ internal uint bt_minkey;
+ internal uint bt_nblobs;
+ internal uint bt_re_len;
+ internal uint bt_re_pad;
+ internal uint bt_levels;
+ internal uint bt_int_pg;
+ internal uint bt_leaf_pg;
+ internal uint bt_dup_pg;
+ internal uint bt_over_pg;
+ internal uint bt_empty_pg;
+ internal uint bt_free;
+ internal ulong bt_int_pgfree;
+ internal ulong bt_leaf_pgfree;
+ internal ulong bt_dup_pgfree;
+ internal ulong bt_over_pgfree;
}
[StructLayout(LayoutKind.Sequential)]
internal struct HashStatStruct {
- internal uint hash_magic;
- internal uint hash_version;
- internal uint hash_metaflags;
- internal uint hash_nkeys;
- internal uint hash_ndata;
- internal uint hash_pagecnt;
- internal uint hash_pagesize;
- internal uint hash_ffactor;
- internal uint hash_buckets;
- internal uint hash_free;
- internal ulong hash_bfree;
- internal uint hash_bigpages;
- internal ulong hash_big_bfree;
- internal uint hash_overflows;
- internal ulong hash_ovfl_free;
- internal uint hash_dup;
- internal ulong hash_dup_free;
+ internal uint hash_magic;
+ internal uint hash_version;
+ internal uint hash_metaflags;
+ internal uint hash_nkeys;
+ internal uint hash_ndata;
+ internal uint hash_nblobs;
+ internal uint hash_pagecnt;
+ internal uint hash_pagesize;
+ internal uint hash_ffactor;
+ internal uint hash_buckets;
+ internal uint hash_free;
+ internal ulong hash_bfree;
+ internal uint hash_bigpages;
+ internal ulong hash_big_bfree;
+ internal uint hash_overflows;
+ internal ulong hash_ovfl_free;
+ internal uint hash_dup;
+ internal ulong hash_dup_free;
}
[StructLayout(LayoutKind.Sequential)]
internal struct HeapStatStruct {
- internal uint heap_magic;
- internal uint heap_version;
- internal uint heap_metaflags;
- internal uint heap_nrecs;
- internal uint heap_pagecnt;
- internal uint heap_pagesize;
- internal uint heap_nregions;
- internal uint heap_regionsize;
+ internal uint heap_magic;
+ internal uint heap_version;
+ internal uint heap_metaflags;
+ internal uint heap_nblobs;
+ internal uint heap_nrecs;
+ internal uint heap_pagecnt;
+ internal uint heap_pagesize;
+ internal uint heap_nregions;
+ internal uint heap_regionsize;
}
[StructLayout(LayoutKind.Sequential)]
internal struct LockStatStruct {
- internal uint st_id;
- internal uint st_cur_maxid;
- internal uint st_initlocks;
- internal uint st_initlockers;
- internal uint st_initobjects;
- internal uint st_locks;
- internal uint st_lockers;
- internal uint st_objects;
- internal uint st_maxlocks;
- internal uint st_maxlockers;
- internal uint st_maxobjects;
- internal uint st_partitions;
- internal uint st_tablesize;
- internal int st_nmodes;
- internal uint st_nlockers;
- internal uint st_nlocks;
- internal uint st_maxnlocks;
- internal uint st_maxhlocks;
- internal ulong st_locksteals;
- internal ulong st_maxlsteals;
- internal uint st_maxnlockers;
- internal uint st_nobjects;
- internal uint st_maxnobjects;
- internal uint st_maxhobjects;
- internal ulong st_objectsteals;
- internal ulong st_maxosteals;
- internal ulong st_nrequests;
- internal ulong st_nreleases;
- internal ulong st_nupgrade;
- internal ulong st_ndowngrade;
- internal ulong st_lock_wait;
- internal ulong st_lock_nowait;
- internal ulong st_ndeadlocks;
- internal uint st_locktimeout;
- internal ulong st_nlocktimeouts;
- internal uint st_txntimeout;
- internal ulong st_ntxntimeouts;
- internal ulong st_part_wait;
- internal ulong st_part_nowait;
- internal ulong st_part_max_wait;
- internal ulong st_part_max_nowait;
- internal ulong st_objs_wait;
- internal ulong st_objs_nowait;
- internal ulong st_lockers_wait;
- internal ulong st_lockers_nowait;
- internal ulong st_region_wait;
- internal ulong st_region_nowait;
- internal uint st_hash_len;
- internal IntPtr st_regsize;
+ internal uint st_id;
+ internal uint st_cur_maxid;
+ internal uint st_initlocks;
+ internal uint st_initlockers;
+ internal uint st_initobjects;
+ internal uint st_locks;
+ internal uint st_lockers;
+ internal uint st_objects;
+ internal uint st_maxlocks;
+ internal uint st_maxlockers;
+ internal uint st_maxobjects;
+ internal uint st_partitions;
+ internal uint st_tablesize;
+ internal int st_nmodes;
+ internal uint st_nlockers;
+ internal uint st_nlocks;
+ internal uint st_maxnlocks;
+ internal uint st_maxhlocks;
+ internal ulong st_locksteals;
+ internal ulong st_maxlsteals;
+ internal uint st_maxnlockers;
+ internal uint st_nobjects;
+ internal uint st_maxnobjects;
+ internal uint st_maxhobjects;
+ internal ulong st_objectsteals;
+ internal ulong st_maxosteals;
+ internal ulong st_nrequests;
+ internal ulong st_nreleases;
+ internal ulong st_nupgrade;
+ internal ulong st_ndowngrade;
+ internal ulong st_lock_wait;
+ internal ulong st_lock_nowait;
+ internal ulong st_ndeadlocks;
+ internal uint st_locktimeout;
+ internal ulong st_nlocktimeouts;
+ internal uint st_txntimeout;
+ internal ulong st_ntxntimeouts;
+ internal ulong st_part_wait;
+ internal ulong st_part_nowait;
+ internal ulong st_part_max_wait;
+ internal ulong st_part_max_nowait;
+ internal ulong st_objs_wait;
+ internal ulong st_objs_nowait;
+ internal ulong st_lockers_wait;
+ internal ulong st_lockers_nowait;
+ internal ulong st_region_wait;
+ internal ulong st_region_nowait;
+ internal ulong st_nlockers_hit;
+ internal ulong st_nlockers_reused;
+ internal uint st_hash_len;
+ internal IntPtr st_regsize;
}
[StructLayout(LayoutKind.Sequential)]
internal struct LogStatStruct {
- internal uint st_magic;
- internal uint st_version;
- internal int st_mode;
- internal uint st_lg_bsize;
- internal uint st_lg_size;
- internal uint st_wc_bytes;
- internal uint st_wc_mbytes;
- internal uint st_fileid_init;
- internal uint st_nfileid;
- internal uint st_maxnfileid;
- internal ulong st_record;
- internal uint st_w_bytes;
- internal uint st_w_mbytes;
- internal ulong st_wcount;
- internal ulong st_wcount_fill;
- internal ulong st_rcount;
- internal ulong st_scount;
- internal ulong st_region_wait;
- internal ulong st_region_nowait;
- internal uint st_cur_file;
- internal uint st_cur_offset;
- internal uint st_disk_file;
- internal uint st_disk_offset;
- internal uint st_maxcommitperflush;
- internal uint st_mincommitperflush;
- internal IntPtr st_regsize;
+ internal uint st_magic;
+ internal uint st_version;
+ internal int st_mode;
+ internal uint st_lg_bsize;
+ internal uint st_lg_size;
+ internal uint st_wc_bytes;
+ internal uint st_wc_mbytes;
+ internal uint st_fileid_init;
+ internal uint st_nfileid;
+ internal uint st_maxnfileid;
+ internal ulong st_record;
+ internal uint st_w_bytes;
+ internal uint st_w_mbytes;
+ internal ulong st_wcount;
+ internal ulong st_wcount_fill;
+ internal ulong st_rcount;
+ internal ulong st_scount;
+ internal ulong st_region_wait;
+ internal ulong st_region_nowait;
+ internal uint st_cur_file;
+ internal uint st_cur_offset;
+ internal uint st_disk_file;
+ internal uint st_disk_offset;
+ internal uint st_maxcommitperflush;
+ internal uint st_mincommitperflush;
+ internal IntPtr st_regsize;
}
[StructLayout(LayoutKind.Sequential)]
internal struct MPoolFileStatStruct {
- internal uint st_pagesize;
- internal uint st_map;
- internal ulong st_cache_hit;
- internal ulong st_cache_miss;
- internal ulong st_page_create;
- internal ulong st_page_in;
- internal ulong st_page_out;
- internal ulong st_backup_spins;
- internal string file_name;
+ internal uint st_pagesize;
+ internal uint st_map;
+ internal ulong st_cache_hit;
+ internal ulong st_cache_miss;
+ internal ulong st_page_create;
+ internal ulong st_page_in;
+ internal ulong st_page_out;
+ internal ulong st_backup_spins;
+ internal string file_name;
}
[StructLayout(LayoutKind.Sequential)]
internal struct MPoolStatStruct {
- internal uint st_gbytes;
- internal uint st_bytes;
- internal uint st_ncache;
- internal uint st_max_ncache;
- internal IntPtr st_mmapsize;
- internal int st_maxopenfd;
- internal int st_maxwrite;
- internal uint st_maxwrite_sleep;
- internal uint st_pages;
- internal uint st_map;
- internal ulong st_cache_hit;
- internal ulong st_cache_miss;
- internal ulong st_page_create;
- internal ulong st_page_in;
- internal ulong st_page_out;
- internal ulong st_ro_evict;
- internal ulong st_rw_evict;
- internal ulong st_page_trickle;
- internal uint st_page_clean;
- internal uint st_page_dirty;
- internal uint st_hash_buckets;
- internal uint st_hash_mutexes;
- internal uint st_pagesize;
- internal uint st_hash_searches;
- internal uint st_hash_longest;
- internal ulong st_hash_examined;
- internal ulong st_hash_nowait;
- internal ulong st_hash_wait;
- internal ulong st_hash_max_nowait;
- internal ulong st_hash_max_wait;
- internal ulong st_region_nowait;
- internal ulong st_region_wait;
- internal ulong st_mvcc_frozen;
- internal ulong st_mvcc_thawed;
- internal ulong st_mvcc_freed;
- internal ulong st_alloc;
- internal ulong st_alloc_buckets;
+ internal uint st_gbytes;
+ internal uint st_bytes;
+ internal uint st_ncache;
+ internal uint st_max_ncache;
+ internal IntPtr st_mmapsize;
+ internal int st_maxopenfd;
+ internal int st_maxwrite;
+ internal uint st_maxwrite_sleep;
+ internal uint st_pages;
+ internal uint st_map;
+ internal ulong st_cache_hit;
+ internal ulong st_cache_miss;
+ internal ulong st_page_create;
+ internal ulong st_page_in;
+ internal ulong st_page_out;
+ internal ulong st_ro_evict;
+ internal ulong st_rw_evict;
+ internal ulong st_page_trickle;
+ internal uint st_page_clean;
+ internal uint st_page_dirty;
+ internal uint st_hash_buckets;
+ internal uint st_hash_mutexes;
+ internal uint st_pagesize;
+ internal uint st_hash_searches;
+ internal uint st_hash_longest;
+ internal ulong st_hash_examined;
+ internal ulong st_hash_nowait;
+ internal ulong st_hash_wait;
+ internal ulong st_hash_max_nowait;
+ internal ulong st_hash_max_wait;
+ internal ulong st_region_nowait;
+ internal ulong st_region_wait;
+ internal ulong st_mvcc_frozen;
+ internal ulong st_mvcc_thawed;
+ internal ulong st_mvcc_freed;
+ internal ulong st_mvcc_reused;
+ internal ulong st_alloc;
+ internal ulong st_alloc_buckets;
internal ulong st_alloc_max_buckets;
- internal ulong st_alloc_pages;
- internal ulong st_alloc_max_pages;
- internal ulong st_io_wait;
- internal ulong st_sync_interrupted;
- internal IntPtr st_regsize;
- internal IntPtr st_regmax;
+ internal ulong st_alloc_pages;
+ internal ulong st_alloc_max_pages;
+ internal ulong st_io_wait;
+ internal ulong st_sync_interrupted;
+ internal uint st_oddfsize_detect;
+ internal uint st_oddfsize_resolve;
+ internal IntPtr st_regsize;
+ internal IntPtr st_regmax;
}
internal struct MempStatStruct {
@@ -220,73 +228,81 @@ namespace BerkeleyDB.Internal {
[StructLayout(LayoutKind.Sequential)]
internal struct MutexStatStruct {
- internal uint st_mutex_align;
- internal uint st_mutex_tas_spins;
- internal uint st_mutex_init;
- internal uint st_mutex_cnt;
- internal uint st_mutex_max;
- internal uint st_mutex_free;
- internal uint st_mutex_inuse;
- internal uint st_mutex_inuse_max;
+ internal uint st_mutex_align;
+ internal uint st_mutex_tas_spins;
+ internal uint st_mutex_init;
+ internal uint st_mutex_cnt;
+ internal uint st_mutex_max;
+ internal uint st_mutex_free;
+ internal uint st_mutex_inuse;
+ internal uint st_mutex_inuse_max;
- internal ulong st_region_wait;
- internal ulong st_region_nowait;
- internal IntPtr st_regsize;
- internal IntPtr st_regmax;
+ internal ulong st_region_wait;
+ internal ulong st_region_nowait;
+ internal IntPtr st_regsize;
+ internal IntPtr st_regmax;
}
[StructLayout(LayoutKind.Sequential)]
internal struct QueueStatStruct {
- internal uint qs_magic;
- internal uint qs_version;
- internal uint qs_metaflags;
- internal uint qs_nkeys;
- internal uint qs_ndata;
- internal uint qs_pagesize;
- internal uint qs_extentsize;
- internal uint qs_pages;
- internal uint qs_re_len;
- internal uint qs_re_pad;
- internal uint qs_pgfree;
- internal uint qs_first_recno;
- internal uint qs_cur_recno;
+ internal uint qs_magic;
+ internal uint qs_version;
+ internal uint qs_metaflags;
+ internal uint qs_nkeys;
+ internal uint qs_ndata;
+ internal uint qs_pagesize;
+ internal uint qs_extentsize;
+ internal uint qs_pages;
+ internal uint qs_re_len;
+ internal uint qs_re_pad;
+ internal uint qs_pgfree;
+ internal uint qs_first_recno;
+ internal uint qs_cur_recno;
}
[StructLayout(LayoutKind.Sequential)]
internal struct RecnoStatStruct {
- internal uint bt_magic;
- internal uint bt_version;
- internal uint bt_metaflags;
- internal uint bt_nkeys;
- internal uint bt_ndata;
- internal uint bt_pagecnt;
- internal uint bt_pagesize;
- internal uint bt_minkey;
- internal uint bt_re_len;
- internal uint bt_re_pad;
- internal uint bt_levels;
- internal uint bt_int_pg;
- internal uint bt_leaf_pg;
- internal uint bt_dup_pg;
- internal uint bt_over_pg;
- internal uint bt_empty_pg;
- internal uint bt_free;
- internal ulong bt_int_pgfree;
- internal ulong bt_leaf_pgfree;
- internal ulong bt_dup_pgfree;
- internal ulong bt_over_pgfree;
+ internal uint bt_magic;
+ internal uint bt_version;
+ internal uint bt_metaflags;
+ internal uint bt_nkeys;
+ internal uint bt_ndata;
+ internal uint bt_pagecnt;
+ internal uint bt_pagesize;
+ internal uint bt_minkey;
+ internal uint bt_nblobs;
+ internal uint bt_re_len;
+ internal uint bt_re_pad;
+ internal uint bt_levels;
+ internal uint bt_int_pg;
+ internal uint bt_leaf_pg;
+ internal uint bt_dup_pg;
+ internal uint bt_over_pg;
+ internal uint bt_empty_pg;
+ internal uint bt_free;
+ internal ulong bt_int_pgfree;
+ internal ulong bt_leaf_pgfree;
+ internal ulong bt_dup_pgfree;
+ internal ulong bt_over_pgfree;
}
[StructLayout(LayoutKind.Sequential)]
internal struct RepMgrStatStruct {
- internal ulong st_perm_failed;
- internal ulong st_msgs_queued;
+ internal ulong st_perm_failed;
+ internal ulong st_msgs_queued;
internal ulong st_msgs_dropped;
- internal ulong st_connection_drop;
- internal ulong st_connect_fail;
- internal ulong st_elect_threads;
- internal ulong st_max_elect_threads;
+ internal uint st_incoming_queue_gbytes;
+ internal uint st_incoming_queue_bytes;
+ internal ulong st_incoming_msgs_dropped;
+ internal ulong st_connection_drop;
+ internal ulong st_connect_fail;
+ internal uint st_elect_threads;
+ internal uint st_max_elect_threads;
+ internal uint st_site_participants;
+ internal uint st_site_total;
+ internal uint st_site_views;
+ internal ulong st_takeovers;
}
[StructLayout(LayoutKind.Sequential)]
@@ -300,108 +316,109 @@ namespace BerkeleyDB.Internal {
* off somewhat (or, on unreasonable architectures under unlucky
* circumstances, garbaged).
*/
- internal uint st_startup_complete;
- internal ulong st_log_queued;
- internal uint st_status;
- internal DB_LSN_STRUCT st_next_lsn;
- internal DB_LSN_STRUCT st_waiting_lsn;
- internal DB_LSN_STRUCT st_max_perm_lsn;
- internal uint st_next_pg;
- internal uint st_waiting_pg;
+ internal uint st_startup_complete;
+ internal uint st_view;
+ internal ulong st_log_queued;
+ internal uint st_status;
+ internal DB_LSN_STRUCT st_next_lsn;
+ internal DB_LSN_STRUCT st_waiting_lsn;
+ internal DB_LSN_STRUCT st_max_perm_lsn;
+ internal uint st_next_pg;
+ internal uint st_waiting_pg;
internal uint st_dupmasters;
- internal IntPtr st_env_id;
- internal uint st_env_priority;
- internal ulong st_bulk_fills;
- internal ulong st_bulk_overflows;
- internal ulong st_bulk_records;
- internal ulong st_bulk_transfers;
+ internal IntPtr st_env_id;
+ internal uint st_env_priority;
+ internal ulong st_bulk_fills;
+ internal ulong st_bulk_overflows;
+ internal ulong st_bulk_records;
+ internal ulong st_bulk_transfers;
internal ulong st_client_rerequests;
internal ulong st_client_svc_req;
internal ulong st_client_svc_miss;
- internal uint st_gen;
- internal uint st_egen;
- internal ulong st_lease_chk;
- internal ulong st_lease_chk_misses;
- internal ulong st_lease_chk_refresh;
- internal ulong st_lease_sends;
-
- internal ulong st_log_duplicated;
- internal ulong st_log_queued_max;
- internal ulong st_log_queued_total;
- internal ulong st_log_records;
- internal ulong st_log_requested;
- internal IntPtr st_master;
- internal ulong st_master_changes;
- internal ulong st_msgs_badgen;
- internal ulong st_msgs_processed;
+ internal uint st_gen;
+ internal uint st_egen;
+ internal ulong st_lease_chk;
+ internal ulong st_lease_chk_misses;
+ internal ulong st_lease_chk_refresh;
+ internal ulong st_lease_sends;
+
+ internal ulong st_log_duplicated;
+ internal ulong st_log_queued_max;
+ internal ulong st_log_queued_total;
+ internal ulong st_log_records;
+ internal ulong st_log_requested;
+ internal IntPtr st_master;
+ internal ulong st_master_changes;
+ internal ulong st_msgs_badgen;
+ internal ulong st_msgs_processed;
internal ulong st_msgs_recover;
internal ulong st_msgs_send_failures;
- internal ulong st_msgs_sent;
- internal ulong st_newsites;
+ internal ulong st_msgs_sent;
+ internal ulong st_newsites;
internal uint st_nsites;
- internal ulong st_nthrottles;
+ internal ulong st_nthrottles;
internal ulong st_outdated;
- internal ulong st_pg_duplicated;
- internal ulong st_pg_records;
- internal ulong st_pg_requested;
- internal ulong st_txns_applied;
+ internal ulong st_pg_duplicated;
+ internal ulong st_pg_records;
+ internal ulong st_pg_requested;
+ internal ulong st_txns_applied;
internal ulong st_startsync_delayed;
- internal ulong st_elections;
- internal ulong st_elections_won;
+ internal ulong st_elections;
+ internal ulong st_elections_won;
- internal IntPtr st_election_cur_winner;
- internal uint st_election_gen;
- internal uint st_election_datagen;
- internal DB_LSN_STRUCT st_election_lsn;
- internal uint st_election_nsites;
- internal uint st_election_nvotes;
- internal uint st_election_priority;
- internal int st_election_status;
+ internal IntPtr st_election_cur_winner;
+ internal uint st_election_gen;
+ internal uint st_election_datagen;
+ internal DB_LSN_STRUCT st_election_lsn;
+ internal uint st_election_nsites;
+ internal uint st_election_nvotes;
+ internal uint st_election_priority;
+ internal int st_election_status;
internal uint st_election_tiebreaker;
- internal uint st_election_votes;
- internal uint st_election_sec;
- internal uint st_election_usec;
- internal uint st_max_lease_sec;
- internal uint st_max_lease_usec;
+ internal uint st_election_votes;
+ internal uint st_election_sec;
+ internal uint st_election_usec;
+ internal uint st_max_lease_sec;
+ internal uint st_max_lease_usec;
}
[StructLayout(LayoutKind.Sequential)]
internal struct SequenceStatStruct {
- internal ulong st_wait;
- internal ulong st_nowait;
- internal long st_current;
- internal long st_value;
- internal long st_last_value;
- internal long st_min;
- internal long st_max;
- internal int st_cache_size;
- internal uint st_flags;
+ internal ulong st_wait;
+ internal ulong st_nowait;
+ internal long st_current;
+ internal long st_value;
+ internal long st_last_value;
+ internal long st_min;
+ internal long st_max;
+ internal uint st_cache_size;
+ internal uint st_flags;
}
[StructLayout(LayoutKind.Sequential)]
internal struct TransactionStatStruct {
internal uint st_nrestores;
- internal DB_LSN_STRUCT st_last_ckp;
- internal long st_time_ckp;
- internal uint st_last_txnid;
- internal uint st_inittxns;
- internal uint st_maxtxns;
- internal ulong st_naborts;
- internal ulong st_nbegins;
- internal ulong st_ncommits;
- internal uint st_nactive;
- internal uint st_nsnapshot;
- internal uint st_maxnactive;
- internal uint st_maxnsnapshot;
- internal ulong st_region_wait;
- internal ulong st_region_nowait;
- internal IntPtr st_regsize;
+ internal DB_LSN_STRUCT st_last_ckp;
+ internal long st_time_ckp;
+ internal uint st_last_txnid;
+ internal uint st_inittxns;
+ internal uint st_maxtxns;
+ internal ulong st_naborts;
+ internal ulong st_nbegins;
+ internal ulong st_ncommits;
+ internal uint st_nactive;
+ internal uint st_nsnapshot;
+ internal uint st_maxnactive;
+ internal uint st_maxnsnapshot;
+ internal ulong st_region_wait;
+ internal ulong st_region_nowait;
+ internal IntPtr st_regsize;
internal IntPtr st_txnarray;
}
diff --git a/lang/csharp/src/Internal/db_lockmode_t.cs b/lang/csharp/src/Internal/db_lockmode_t.cs
index 5db5ad05..e59c2a7d 100644
--- a/lang/csharp/src/Internal/db_lockmode_t.cs
+++ b/lang/csharp/src/Internal/db_lockmode_t.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/db_lockop_t.cs b/lang/csharp/src/Internal/db_lockop_t.cs
index ae4ce53b..e61a032d 100644
--- a/lang/csharp/src/Internal/db_lockop_t.cs
+++ b/lang/csharp/src/Internal/db_lockop_t.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/db_recops.cs b/lang/csharp/src/Internal/db_recops.cs
index 2b186559..61e22dda 100644
--- a/lang/csharp/src/Internal/db_recops.cs
+++ b/lang/csharp/src/Internal/db_recops.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/libdb_csharp.cs b/lang/csharp/src/Internal/libdb_csharp.cs
index db94d2a4..fd28787c 100644
--- a/lang/csharp/src/Internal/libdb_csharp.cs
+++ b/lang/csharp/src/Internal/libdb_csharp.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
diff --git a/lang/csharp/src/Internal/libdb_csharpPINVOKE.cs b/lang/csharp/src/Internal/libdb_csharpPINVOKE.cs
index 18243479..6be15c65 100644
--- a/lang/csharp/src/Internal/libdb_csharpPINVOKE.cs
+++ b/lang/csharp/src/Internal/libdb_csharpPINVOKE.cs
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.4
+ * Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
@@ -217,6 +217,21 @@ class libdb_csharpPINVOKE {
[DllImport(libname, EntryPoint="CSharp_DB_set_append_recno")]
public static extern int DB_set_append_recno(HandleRef jarg1, BDB_AppendRecnoDelegate jarg2);
+ [DllImport(libname, EntryPoint="CSharp_DB_get_blob_dir")]
+ public static extern int DB_get_blob_dir(HandleRef jarg1, out IntPtr jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_set_blob_dir")]
+ public static extern int DB_set_blob_dir(HandleRef jarg1, string jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_get_blob_sub_dir")]
+ public static extern int DB_get_blob_sub_dir(HandleRef jarg1, out IntPtr jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_get_blob_threshold")]
+ public static extern int DB_get_blob_threshold(HandleRef jarg1, ref uint jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_set_blob_threshold")]
+ public static extern int DB_set_blob_threshold(HandleRef jarg1, uint jarg2, uint jarg3);
+
[DllImport(libname, EntryPoint="CSharp_DB_set_bt_compare")]
public static extern int DB_set_bt_compare(HandleRef jarg1, BDB_CompareDelegate jarg2);
@@ -307,6 +322,21 @@ class libdb_csharpPINVOKE {
[DllImport(libname, EntryPoint="CSharp_DB_set_pagesize")]
public static extern int DB_set_pagesize(HandleRef jarg1, uint jarg2);
+ [DllImport(libname, EntryPoint="CSharp_DB_set_msgcall")]
+ public static extern void DB_set_msgcall(HandleRef jarg1, BDB_MsgcallDelegate jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_set_msgfile")]
+ public static extern int DB_set_msgfile(HandleRef jarg1, string jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_get_partition_keys")]
+ public static extern IntPtr DB_get_partition_keys(HandleRef jarg1, ref uint jarg2, ref uint jarg3, ref int jarg4);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_get_partition_parts")]
+ public static extern int DB_get_partition_parts(HandleRef jarg1, ref uint jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_set_partition")]
+ public static extern int DB_set_partition(HandleRef jarg1, uint jarg2, IntPtr[] jarg3, BDB_PartitionDelegate jarg4);
+
[DllImport(libname, EntryPoint="CSharp_DB_get_priority")]
public static extern int DB_get_priority(HandleRef jarg1, ref uint jarg2);
@@ -370,6 +400,9 @@ class libdb_csharpPINVOKE {
[DllImport(libname, EntryPoint="CSharp_DBC_count")]
public static extern int DBC_count(HandleRef jarg1, ref uint jarg2, uint jarg3);
+ [DllImport(libname, EntryPoint="CSharp_DBC_db_stream")]
+ public static extern IntPtr DBC_db_stream(HandleRef jarg1, uint jarg2, ref int jarg3);
+
[DllImport(libname, EntryPoint="CSharp_DBC_del")]
public static extern int DBC_del(HandleRef jarg1, uint jarg2);
@@ -481,6 +514,24 @@ class libdb_csharpPINVOKE {
[DllImport(libname, EntryPoint="CSharp_delete_DB_SITE")]
public static extern void delete_DB_SITE(HandleRef jarg1);
+ [DllImport(libname, EntryPoint="CSharp_DB_STREAM_close")]
+ public static extern int DB_STREAM_close(HandleRef jarg1, uint jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_STREAM_read")]
+ public static extern int DB_STREAM_read(HandleRef jarg1, HandleRef jarg2, Int64 jarg3, uint jarg4, uint jarg5);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_STREAM_size")]
+ public static extern int DB_STREAM_size(HandleRef jarg1, ref Int64 jarg2, uint jarg3);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_STREAM_write")]
+ public static extern int DB_STREAM_write(HandleRef jarg1, HandleRef jarg2, Int64 jarg3, uint jarg4);
+
+ [DllImport(libname, EntryPoint="CSharp_new_DB_STREAM")]
+ public static extern IntPtr new_DB_STREAM();
+
+ [DllImport(libname, EntryPoint="CSharp_delete_DB_STREAM")]
+ public static extern void delete_DB_STREAM(HandleRef jarg1);
+
[DllImport(libname, EntryPoint="CSharp_DB_REPMGR_SITE_eid_set")]
public static extern void DB_REPMGR_SITE_eid_set(HandleRef jarg1, int jarg2);
@@ -733,6 +784,12 @@ class libdb_csharpPINVOKE {
[DllImport(libname, EntryPoint="CSharp_DB_ENV_repmgr_get_ack_policy")]
public static extern int DB_ENV_repmgr_get_ack_policy(HandleRef jarg1, ref int jarg2);
+ [DllImport(libname, EntryPoint="CSharp_DB_ENV_repmgr_get_incoming_queue_max")]
+ public static extern int DB_ENV_repmgr_get_incoming_queue_max(HandleRef jarg1, ref uint jarg2, ref uint jarg3);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_ENV_repmgr_set_incoming_queue_max")]
+ public static extern int DB_ENV_repmgr_set_incoming_queue_max(HandleRef jarg1, uint jarg2, uint jarg3);
+
[DllImport(libname, EntryPoint="CSharp_DB_ENV_repmgr_channel")]
public static extern IntPtr DB_ENV_repmgr_channel(HandleRef jarg1, int jarg2, uint jarg3, ref int jarg4);
@@ -823,6 +880,9 @@ class libdb_csharpPINVOKE {
[DllImport(libname, EntryPoint="CSharp_DB_ENV_rep_set_transport")]
public static extern int DB_ENV_rep_set_transport(HandleRef jarg1, int jarg2, BDB_RepTransportDelegate jarg3);
+ [DllImport(libname, EntryPoint="CSharp_DB_ENV_rep_set_view")]
+ public static extern int DB_ENV_rep_set_view(HandleRef jarg1, BDB_ReplicationViewDelegate jarg2);
+
[DllImport(libname, EntryPoint="CSharp_DB_ENV_set_backup_callbacks")]
public static extern int DB_ENV_set_backup_callbacks(HandleRef jarg1, BDB_BackupOpenDelegate jarg2, BDB_BackupWriteDelegate jarg3, BDB_BackupCloseDelegate jarg4);
@@ -832,6 +892,18 @@ class libdb_csharpPINVOKE {
[DllImport(libname, EntryPoint="CSharp_DB_ENV_set_backup_config")]
public static extern int DB_ENV_set_backup_config(HandleRef jarg1, uint jarg2, uint jarg3);
+ [DllImport(libname, EntryPoint="CSharp_DB_ENV_get_blob_dir")]
+ public static extern int DB_ENV_get_blob_dir(HandleRef jarg1, out IntPtr jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_ENV_set_blob_dir")]
+ public static extern int DB_ENV_set_blob_dir(HandleRef jarg1, string jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_ENV_get_blob_threshold")]
+ public static extern int DB_ENV_get_blob_threshold(HandleRef jarg1, ref uint jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_ENV_set_blob_threshold")]
+ public static extern int DB_ENV_set_blob_threshold(HandleRef jarg1, uint jarg2, uint jarg3);
+
[DllImport(libname, EntryPoint="CSharp_DB_ENV_get_cachesize")]
public static extern int DB_ENV_get_cachesize(HandleRef jarg1, ref uint jarg2, ref uint jarg3, ref int jarg4);
@@ -997,6 +1069,12 @@ class libdb_csharpPINVOKE {
[DllImport(libname, EntryPoint="CSharp_DB_ENV_set_mp_mmapsize")]
public static extern int DB_ENV_set_mp_mmapsize(HandleRef jarg1, uint jarg2);
+ [DllImport(libname, EntryPoint="CSharp_DB_ENV_set_msgcall")]
+ public static extern void DB_ENV_set_msgcall(HandleRef jarg1, BDB_MsgcallDelegate jarg2);
+
+ [DllImport(libname, EntryPoint="CSharp_DB_ENV_set_msgfile")]
+ public static extern int DB_ENV_set_msgfile(HandleRef jarg1, string jarg2);
+
[DllImport(libname, EntryPoint="CSharp_DB_ENV_get_thread_count")]
public static extern int DB_ENV_get_thread_count(HandleRef jarg1, ref uint jarg2);
@@ -1190,7 +1268,7 @@ class libdb_csharpPINVOKE {
public static extern int DB_SEQUENCE_close(HandleRef jarg1, uint jarg2);
[DllImport(libname, EntryPoint="CSharp_DB_SEQUENCE_get")]
- public static extern int DB_SEQUENCE_get(HandleRef jarg1, HandleRef jarg2, int jarg3, ref Int64 jarg4, uint jarg5);
+ public static extern int DB_SEQUENCE_get(HandleRef jarg1, HandleRef jarg2, uint jarg3, ref Int64 jarg4, uint jarg5);
[DllImport(libname, EntryPoint="CSharp_DB_SEQUENCE_get_db")]
public static extern IntPtr DB_SEQUENCE_get_db(HandleRef jarg1);
@@ -1208,10 +1286,10 @@ class libdb_csharpPINVOKE {
public static extern int DB_SEQUENCE_remove(HandleRef jarg1, HandleRef jarg2, uint jarg3);
[DllImport(libname, EntryPoint="CSharp_DB_SEQUENCE_get_cachesize")]
- public static extern int DB_SEQUENCE_get_cachesize(HandleRef jarg1, ref int jarg2);
+ public static extern int DB_SEQUENCE_get_cachesize(HandleRef jarg1, ref uint jarg2);
[DllImport(libname, EntryPoint="CSharp_DB_SEQUENCE_set_cachesize")]
- public static extern int DB_SEQUENCE_set_cachesize(HandleRef jarg1, int jarg2);
+ public static extern int DB_SEQUENCE_set_cachesize(HandleRef jarg1, uint jarg2);
[DllImport(libname, EntryPoint="CSharp_DB_SEQUENCE_get_flags")]
public static extern int DB_SEQUENCE_get_flags(HandleRef jarg1, ref uint jarg2);
diff --git a/lang/csharp/src/JoinCursor.cs b/lang/csharp/src/JoinCursor.cs
index 4522442d..aa813e20 100644
--- a/lang/csharp/src/JoinCursor.cs
+++ b/lang/csharp/src/JoinCursor.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -55,7 +55,7 @@ namespace BerkeleyDB {
/// <summary>
/// Release the resources held by this object, and close the cursor if
- /// it's still open.
+ /// it is still open.
/// </summary>
public void Dispose() {
try {
@@ -88,7 +88,7 @@ namespace BerkeleyDB {
/// <see cref="JoinCursor"/>.
/// </summary>
/// <remarks>
- /// The enumerator will begin at the cursor's current position (or the
+ /// The enumerator begins at the cursor's current position (or the
/// first record if the cursor has not yet been positioned) and iterate
/// forwards (i.e. in the direction of <see cref="MoveNext"/>) over the
/// remaining records.
@@ -137,7 +137,7 @@ namespace BerkeleyDB {
/// <see cref="Current">Current.Key</see>.
/// </summary>
/// <remarks>
- /// <see cref="Current">Current.Value</see> will contain an empty
+ /// <see cref="Current">Current.Value</see> contains an empty
/// <see cref="DatabaseEntry"/>.
/// </remarks>
/// <returns>
@@ -154,7 +154,7 @@ namespace BerkeleyDB {
/// <see cref="Current">Current.Key</see>.
/// </summary>
/// <remarks>
- /// <see cref="Current">Current.Value</see> will contain an empty
+ /// <see cref="Current">Current.Value</see> contains an empty
/// <see cref="DatabaseEntry"/>.
/// </remarks>
/// <param name="info">The locking behavior to use.</param>
diff --git a/lang/csharp/src/KeyRange.cs b/lang/csharp/src/KeyRange.cs
index edbf3ac6..f1d9c0ab 100644
--- a/lang/csharp/src/KeyRange.cs
+++ b/lang/csharp/src/KeyRange.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -18,8 +18,8 @@ namespace BerkeleyDB {
/// <para>
/// Values are in the range of 0 to 1; for example, if the field less is
/// 0.05, 5% of the keys in the database are less than the key parameter.
- /// The value for equal will be zero if there is no matching key, and will
- /// be non-zero otherwise.
+ /// The value for equal is zero if there is no matching key, and is
+ /// non-zero otherwise.
/// </para>
/// </summary>
public class KeyRange {
diff --git a/lang/csharp/src/LSN.cs b/lang/csharp/src/LSN.cs
index 1935bf47..17dbfb7a 100644
--- a/lang/csharp/src/LSN.cs
+++ b/lang/csharp/src/LSN.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/Lock.cs b/lang/csharp/src/Lock.cs
index 38f6af6e..b81a8545 100644
--- a/lang/csharp/src/Lock.cs
+++ b/lang/csharp/src/Lock.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/LockDetectMode.cs b/lang/csharp/src/LockDetectMode.cs
deleted file mode 100644
index a52de68b..00000000
--- a/lang/csharp/src/LockDetectMode.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * See the file LICENSE for redistribution information.
- *
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
- *
- */
-using System;
-using System.Collections.Generic;
-using System.Text;
-using CSharp_API.Internal;
-
-namespace CSharp_API
-{
- public class LockDetectMode
- {
- public static LockDetectMode DEFAULT = new LockDetectMode(DbConstants.DB_LOCK_DEFAULT);
- public static LockDetectMode EXPIRE = new LockDetectMode(DbConstants.DB_LOCK_EXPIRE);
- public static LockDetectMode MAXLOCKS = new LockDetectMode(DbConstants.DB_LOCK_MAXLOCKS);
- public static LockDetectMode MAXWRITE = new LockDetectMode(DbConstants.DB_LOCK_MAXWRITE);
- public static LockDetectMode MINLOCKS = new LockDetectMode(DbConstants.DB_LOCK_MINLOCKS);
- public static LockDetectMode MINWRITE = new LockDetectMode(DbConstants.DB_LOCK_MINWRITE);
- public static LockDetectMode OLDEST = new LockDetectMode(DbConstants.DB_LOCK_OLDEST);
- public static LockDetectMode RANDOM = new LockDetectMode(DbConstants.DB_LOCK_RANDOM);
- public static LockDetectMode YOUNGEST = new LockDetectMode(DbConstants.DB_LOCK_YOUNGEST);
-
- private uint mode;
-
- internal static uint GetMode(LockDetectMode ldm)
- {
- return ldm == null ? 0 : ldm.mode;
- }
-
-
- private LockDetectMode(uint detectMode)
- {
- mode = detectMode;
- }
- }
-}
diff --git a/lang/csharp/src/LockMode.cs b/lang/csharp/src/LockMode.cs
index cc82458a..0a338db1 100644
--- a/lang/csharp/src/LockMode.cs
+++ b/lang/csharp/src/LockMode.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/LockOperation.cs b/lang/csharp/src/LockOperation.cs
index 3c46971b..a2b004c2 100644
--- a/lang/csharp/src/LockOperation.cs
+++ b/lang/csharp/src/LockOperation.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/LockRequest.cs b/lang/csharp/src/LockRequest.cs
index 826d7509..25bd2fdb 100644
--- a/lang/csharp/src/LockRequest.cs
+++ b/lang/csharp/src/LockRequest.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/LockStats.cs b/lang/csharp/src/LockStats.cs
index 82812a00..42666f05 100644
--- a/lang/csharp/src/LockStats.cs
+++ b/lang/csharp/src/LockStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -103,6 +103,14 @@ namespace BerkeleyDB {
/// </summary>
public uint Lockers { get { return st.st_nlockers; } }
/// <summary>
+ /// Number of hits in the thread locker cache.
+ /// </summary>
+ public ulong LockersHit { get { return st.st_nlockers_hit; } }
+ /// <summary>
+ /// Total number of lockers reused.
+ /// </summary>
+ public ulong LockersReused { get { return st.st_nlockers_reused; } }
+ /// <summary>
/// Current number of locks.
/// </summary>
public uint Locks { get { return st.st_nlocks; } }
@@ -159,11 +167,11 @@ namespace BerkeleyDB {
/// </summary>
public uint MaxUnusedID { get { return st.st_cur_maxid; } }
/// <summary>
- /// Maximum num of objects in table.
+ /// Maximum number of objects in table.
/// </summary>
public uint MaxObjectsInTable { get { return st.st_maxobjects; } }
/// <summary>
- /// number of partitions.
+ /// Number of partitions.
/// </summary>
public uint nPartitions { get { return st.st_partitions; } }
/// <summary>
@@ -216,4 +224,5 @@ namespace BerkeleyDB {
public ulong TxnTimeouts { get { return st.st_ntxntimeouts; } }
}
-} \ No newline at end of file
+}
+
diff --git a/lang/csharp/src/LockingConfig.cs b/lang/csharp/src/LockingConfig.cs
index d8b5217d..4cebf3a7 100644
--- a/lang/csharp/src/LockingConfig.cs
+++ b/lang/csharp/src/LockingConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -38,7 +38,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// Conflicts will be ignored.
+ /// Conflicts is ignored.
/// </para>
/// </remarks>
public byte[,] Conflicts {
@@ -71,7 +71,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// InitLockers will be ignored.
+ /// InitLockers is ignored.
/// </para>
/// </remarks>
public uint InitLockerCount {
@@ -98,7 +98,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// InitLocks will be ignored.
+ /// InitLocks is ignored.
/// </para>
/// </remarks>
public uint InitLockCount {
@@ -126,7 +126,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// InitLockObjects will be ignored.
+ /// InitLockObjects is ignored.
/// </para>
/// </remarks>
public uint InitLockObjectCount {
@@ -155,7 +155,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// MaxLockers will be ignored.
+ /// MaxLockers is ignored.
/// </para>
/// </remarks>
public uint MaxLockers {
@@ -183,7 +183,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// MaxLocks will be ignored.
+ /// MaxLocks is ignored.
/// </para>
/// </remarks>
public uint MaxLocks {
@@ -211,7 +211,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// MaxObjects will be ignored.
+ /// MaxObjects is ignored.
/// </para>
/// </remarks>
public uint MaxObjects {
@@ -240,7 +240,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// Partitions will be ignored.
+ /// Partitions is ignored.
/// </para>
/// </remarks>
public uint Partitions {
@@ -265,7 +265,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// tablesize will be ignored.
+ /// tablesize is ignored.
/// </para>
/// </remarks>
public uint TableSize {
diff --git a/lang/csharp/src/LockingInfo.cs b/lang/csharp/src/LockingInfo.cs
index 1e902346..3289ae9b 100644
--- a/lang/csharp/src/LockingInfo.cs
+++ b/lang/csharp/src/LockingInfo.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -19,14 +19,14 @@ namespace BerkeleyDB {
/// </summary>
public Isolation IsolationDegree;
/// <summary>
- /// If true, acquire write locks instead of read locks when doing a
- /// read, if locking is configured.
+ /// If true and if locking is configured, acquire write locks instead of
+ /// read locks when doing a read.
/// </summary>
/// <remarks>
/// Setting ReadModifyWrite can eliminate deadlock during a
/// read-modify-write cycle by acquiring the write lock during the read
/// part of the cycle so that another thread of control acquiring a read
- /// lock for the same item, in its own read-modify-write cycle, will not
+ /// lock for the same item, in its own read-modify-write cycle, does not
/// result in deadlock.
/// </remarks>
public bool ReadModifyWrite;
diff --git a/lang/csharp/src/LogConfig.cs b/lang/csharp/src/LogConfig.cs
index 8a255b15..2ee4c08a 100644
--- a/lang/csharp/src/LogConfig.cs
+++ b/lang/csharp/src/LogConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -16,7 +16,7 @@ namespace BerkeleyDB {
/// </summary>
public class LogConfig {
/// <summary>
- /// If true, Berkeley DB will automatically remove log files that are no
+ /// If true, Berkeley DB automatically removes log files that are no
/// longer needed.
/// </summary>
/// <remarks>
@@ -24,21 +24,21 @@ namespace BerkeleyDB {
/// Automatic log file removal is likely to make catastrophic recovery
/// impossible.
/// </para>
- /// <para>
+ /// <para>
/// Replication Manager applications operate in a group-aware manner for
- /// log file removal, and automatic log file removal simplifies the
+ /// log file removal. Automatic log file removal simplifies the
/// application.
/// </para>
/// <para>
- /// Replication Base API applications will rarely want to configure
+ /// Replication Base API applications rarely want to configure
/// automatic log file removal as it increases the likelihood a master
- /// will be unable to satisfy a client's request for a recent log
+ /// is unable to satisfy a client's request for a recent log
/// record.
/// </para>
/// </remarks>
public bool AutoRemove;
/// <summary>
- /// If true, Berkeley DB will flush log writes to the backing disk
+ /// If true, Berkeley DB flushes log writes to the backing disk
/// before returning from the write system call, rather than flushing
/// log writes explicitly in a separate system call, as necessary.
/// </summary>
@@ -55,14 +55,14 @@ namespace BerkeleyDB {
/// </remarks>
public bool ForceSync;
/// <summary>
- /// If true, maintain transaction logs in memory rather than on disk.
+ /// If true, maintain transaction logs in-memory rather than on disk.
/// </summary>
/// <remarks>
/// <para>
/// This means that transactions exhibit the ACI (atomicity,
- /// consistency, and isolation) properties, but not D (durability); that
- /// is, database integrity will be maintained, but if the application or
- /// system fails, integrity will not persist. All database files must be
+ /// consistency, and isolation) properties, but not D (durability);
+ /// database integrity is maintained, but if the application or
+ /// system fails, integrity does not persist. All database files must be
/// verified and/or restored from a replication group master or archival
/// backup after application or system failure.
/// </para>
@@ -71,25 +71,34 @@ namespace BerkeleyDB {
/// available, Berkeley DB methods may throw
/// <see cref="FullLogBufferException"/>. When choosing log buffer and
/// file sizes for in-memory logs, applications should ensure the
- /// in-memory log buffer size is large enough that no transaction will
- /// ever span the entire buffer, and avoid a state where the in-memory
+ /// in-memory log buffer size is large enough that no transaction
+ /// ever spans the entire buffer, and avoids a state where the in-memory
/// buffer is full and no space can be freed because a transaction that
/// started in the first log "file" is still active.
/// </para>
/// </remarks>
public bool InMemory;
/// <summary>
+ /// If true, enables full logging of blob data.
+ /// Required if using HA or the hotbackup utility.
+ /// </summary>
+ public bool LogBlobContent;
+ /// <summary>
/// If true, turn off system buffering of Berkeley DB log files to avoid
/// double caching.
/// </summary>
public bool NoBuffer;
/// <summary>
+ /// If true, avoid the fsync() call when the log flies are flushed.
+ /// </summary>
+ public bool NoSync;
+ /// <summary>
/// If true, zero all pages of a log file when that log file is created.
/// </summary>
/// <remarks>
/// <para>
/// This has shown to provide greater transaction throughput in some
- /// environments. The log file will be zeroed by the thread which needs
+ /// environments. The log file is zeroed by the thread which needs
/// to re-create the new log file. Other threads may not write to the
/// log file while this is happening.
/// </para>
@@ -105,8 +114,12 @@ namespace BerkeleyDB {
ret |= DbConstants.DB_LOG_DSYNC;
if (InMemory)
ret |= DbConstants.DB_LOG_IN_MEMORY;
+ if (LogBlobContent)
+ ret |= DbConstants.DB_LOG_BLOB;
if (NoBuffer)
ret |= DbConstants.DB_LOG_DIRECT;
+ if (NoSync)
+ ret |= DbConstants.DB_LOG_NOSYNC;
if (ZeroOnCreate)
ret |= DbConstants.DB_LOG_ZERO;
return ret;
@@ -138,7 +151,7 @@ namespace BerkeleyDB {
/// all log information that can accumulate during the longest running
/// transaction. When choosing log buffer and file sizes for in-memory
/// logs, applications should ensure the in-memory log buffer size is
- /// large enough that no transaction will ever span the entire buffer,
+ /// large enough that no transaction ever spans the entire buffer,
/// and avoid a state where the in-memory buffer is full and no space
/// can be freed because a transaction that started in the first log
/// "file" is still active.
@@ -159,7 +172,7 @@ namespace BerkeleyDB {
/// <summary>
/// The path of a directory to be used as the location of logging files.
- /// Log files created by the Log Manager subsystem will be created in
+ /// Log files created by the Log Manager subsystem are created in
/// this directory.
/// </summary>
/// <remarks>
@@ -200,7 +213,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// InitLogIds will be ignored.
+ /// InitLogIds is ignored.
/// </para>
/// </remarks>
public uint InitLogIdCount {
@@ -223,7 +236,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// Normally, if Berkeley DB applications set their umask appropriately,
- /// all processes in the application suite will have read permission on
+ /// all processes in the application suite obtain read permission on
/// the log files created by any process in the application suite.
/// However, if the Berkeley DB application is a library, a process
/// using the library might set its umask to a value preventing other
@@ -263,7 +276,7 @@ namespace BerkeleyDB {
/// may be configured to store log records on-disk.) When choosing log
/// buffer and file sizes for in-memory logs, applications should ensure
/// the in-memory log buffer size is large enough that no transaction
- /// will ever span the entire buffer, and avoid a state where the
+ /// ever spans the entire buffer, and avoids a state where the
/// in-memory buffer is full and no space can be freed because a
/// transaction that started in the first log "file" is still active.
/// </para>
@@ -273,8 +286,8 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If no size is specified by the application, the size last specified
- /// for the database region will be used, or if no database region
- /// previously existed, the default will be used.
+ /// for the database region is used, or if no database region
+ /// previously existed, the default is used.
/// </para></remarks>
public uint MaxFileSize {
get { return _maxSize; }
@@ -294,14 +307,14 @@ namespace BerkeleyDB {
/// <para>
/// By default, or if the value is set to 0, the default size is
/// approximately 60KB. The log region is used to store filenames, and
- /// so may need to be increased in size if a large number of files will
- /// be opened and registered with the specified Berkeley DB
+ /// so may need to be increased in size if a large number of files are
+ /// opened and registered with the specified Berkeley DB
/// environment's log manager.
/// </para>
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// RegionSize will be ignored.
+ /// RegionSize is ignored.
/// </para>
/// </remarks>
public uint RegionSize {
diff --git a/lang/csharp/src/LogStats.cs b/lang/csharp/src/LogStats.cs
index 9c52583c..4d0ed751 100644
--- a/lang/csharp/src/LogStats.cs
+++ b/lang/csharp/src/LogStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/LogVerifyConfig.cs b/lang/csharp/src/LogVerifyConfig.cs
index 60f99448..dc18d06b 100644
--- a/lang/csharp/src/LogVerifyConfig.cs
+++ b/lang/csharp/src/LogVerifyConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/MPoolConfig.cs b/lang/csharp/src/MPoolConfig.cs
index e83ff391..1539db8b 100644
--- a/lang/csharp/src/MPoolConfig.cs
+++ b/lang/csharp/src/MPoolConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -15,7 +15,7 @@ namespace BerkeleyDB {
/// </summary>
public class MPoolConfig {
/// <summary>
- /// The size of the shared memory buffer pool — that is, the cache.
+ /// The size of the shared memory buffer pool (the cache).
/// </summary>
/// <remarks>
/// <para>
@@ -30,7 +30,7 @@ namespace BerkeleyDB {
/// by 25% to account for buffer pool overhead; cache sizes larger than
/// 500MB are used as specified. The maximum size of a single cache is
/// 4GB on 32-bit systems and 10TB on 64-bit systems. (All sizes are in
- /// powers-of-two, that is, 256KB is 2^18 not 256,000.) For information
+ /// powers-of-two, 256KB is 2^18 not 256,000.) For information
/// on tuning the Berkeley DB cache size, see Selecting a cache size in
/// the Programmer's Reference Guide.
/// </para>
@@ -52,7 +52,7 @@ namespace BerkeleyDB {
internal bool maxOpenFDIsSet;
private int maxOpenFD;
/// <summary>
- /// The number of file descriptors the library will open concurrently
+ /// The number of file descriptors the library opens concurrently
/// when flushing dirty pages from the cache.
/// </summary>
public int MaxOpenFiles {
diff --git a/lang/csharp/src/MPoolFileStats.cs b/lang/csharp/src/MPoolFileStats.cs
index 7ae8cf38..117efc48 100644
--- a/lang/csharp/src/MPoolFileStats.cs
+++ b/lang/csharp/src/MPoolFileStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/MPoolStats.cs b/lang/csharp/src/MPoolStats.cs
index 4cf2a1e4..e5da46ab 100644
--- a/lang/csharp/src/MPoolStats.cs
+++ b/lang/csharp/src/MPoolStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -37,7 +37,7 @@ namespace BerkeleyDB {
/// </summary>
public ulong MaxMMapSize { get { return (ulong)st.st_mmapsize.ToInt64(); } }
/// <summary>
- /// Maximum number of open fd's.
+ /// Maximum number of open file descriptors.
/// </summary>
public int MaxOpenFileDescriptors { get { return st.st_maxopenfd; } }
/// <summary>
@@ -157,6 +157,10 @@ namespace BerkeleyDB {
/// </summary>
public ulong FrozenBuffersFreed { get { return st.st_mvcc_freed; } }
/// <summary>
+ /// Outdated invisible buffers reused.
+ /// </summary>
+ public ulong OutdatedInvisibleBuffersReused { get { return st.st_mvcc_reused; } }
+ /// <summary>
/// Number of page allocations.
/// </summary>
public ulong PageAllocations { get { return st.st_alloc; } }
@@ -165,7 +169,7 @@ namespace BerkeleyDB {
/// </summary>
public ulong BucketsCheckedDuringAlloc { get { return st.st_alloc_buckets; } }
/// <summary>
- /// Max checked during allocation.
+ /// Max buckets checked during allocation.
/// </summary>
public ulong MaxBucketsCheckedDuringAlloc { get { return st.st_alloc_max_buckets; } }
/// <summary>
@@ -173,7 +177,7 @@ namespace BerkeleyDB {
/// </summary>
public ulong PagesCheckedDuringAlloc { get { return st.st_alloc_pages; } }
/// <summary>
- /// Max checked during allocation.
+ /// Max pages checked during allocation.
/// </summary>
public ulong MaxPagesCheckedDuringAlloc { get { return st.st_alloc_max_pages; } }
/// <summary>
@@ -185,6 +189,14 @@ namespace BerkeleyDB {
/// </summary>
public ulong SyncInterrupted { get { return st.st_sync_interrupted; } }
/// <summary>
+ /// Odd file size detected.
+ /// </summary>
+ public uint OddFileSizeDetected { get { return st.st_oddfsize_detect; } }
+ /// <summary>
+ /// Odd file size resolved.
+ /// </summary>
+ public uint OddFileSizeResolve { get { return st.st_oddfsize_resolve; } }
+ /// <summary>
/// Region size.
/// </summary>
public ulong RegionSize { get { return (ulong)st.st_regsize.ToInt64(); } }
diff --git a/lang/csharp/src/MultipleDatabaseEntry.cs b/lang/csharp/src/MultipleDatabaseEntry.cs
index 7f8878e8..db818076 100644
--- a/lang/csharp/src/MultipleDatabaseEntry.cs
+++ b/lang/csharp/src/MultipleDatabaseEntry.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/MultipleKeyDatabaseEntry.cs b/lang/csharp/src/MultipleKeyDatabaseEntry.cs
index 05512ff5..0da08c48 100644
--- a/lang/csharp/src/MultipleKeyDatabaseEntry.cs
+++ b/lang/csharp/src/MultipleKeyDatabaseEntry.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/Mutex.cs b/lang/csharp/src/Mutex.cs
index 171cb984..66c3c5f9 100644
--- a/lang/csharp/src/Mutex.cs
+++ b/lang/csharp/src/Mutex.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/MutexConfig.cs b/lang/csharp/src/MutexConfig.cs
index 35bc7fb2..36bbffbf 100644
--- a/lang/csharp/src/MutexConfig.cs
+++ b/lang/csharp/src/MutexConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -29,7 +29,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// Alignment will be ignored.
+ /// Alignment is ignored.
/// </para>
/// </remarks>
public uint Alignment {
@@ -48,7 +48,7 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// If both Increment and <see cref="MaxMutexes"/> are set, the value of
- /// Increment will be silently ignored.
+ /// Increment is silently ignored.
/// </para>
/// <para>
/// If the database environment already exists when
@@ -78,7 +78,7 @@ namespace BerkeleyDB {
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// InitMutexes will be ignored.
+ /// InitMutexes is ignored.
/// </para>
/// </remarks>
public uint InitMutexes {
@@ -106,12 +106,12 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If both <see cref="Increment"/> and MaxMutexes are set, the value of
- /// Increment will be silently ignored.
+ /// Increment is silently ignored.
/// </para>
/// <para>
/// If the database environment already exists when
/// <see cref="DatabaseEnvironment.Open"/> is called, the value of
- /// MaxMutexes will be ignored.
+ /// MaxMutexes is ignored.
/// </para>
/// </remarks>
public uint MaxMutexes {
diff --git a/lang/csharp/src/MutexStats.cs b/lang/csharp/src/MutexStats.cs
index a79bc5cb..cbbd6473 100644
--- a/lang/csharp/src/MutexStats.cs
+++ b/lang/csharp/src/MutexStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/PreparedTransaction.cs b/lang/csharp/src/PreparedTransaction.cs
index 4e3e0b8e..bfa79e59 100644
--- a/lang/csharp/src/PreparedTransaction.cs
+++ b/lang/csharp/src/PreparedTransaction.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/Properties/AssemblyInfo.cs b/lang/csharp/src/Properties/AssemblyInfo.cs
index d5224255..4943b93f 100644
--- a/lang/csharp/src/Properties/AssemblyInfo.cs
+++ b/lang/csharp/src/Properties/AssemblyInfo.cs
@@ -1,10 +1,10 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
-using System.Reflection;
+using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -16,7 +16,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Oracle")]
[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("Copyright © 2009, 2012 Oracle Corporation and/or its affiliates. All rights reserved.")]
+[assembly: AssemblyCopyright("Copyright © 2009, 2015 Oracle Corporation and/or its affiliates. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
-[assembly: AssemblyVersion("5.3.21")]
+[assembly: AssemblyVersion("6.1.23")]
diff --git a/lang/csharp/src/QueueDatabase.cs b/lang/csharp/src/QueueDatabase.cs
index 696c029a..6fe194ab 100644
--- a/lang/csharp/src/QueueDatabase.cs
+++ b/lang/csharp/src/QueueDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -25,7 +25,7 @@ namespace BerkeleyDB {
private void Config(QueueDatabaseConfig cfg) {
base.Config(cfg);
/*
- * Database.Config calls set_flags, but that doesn't get the Queue
+ * Database.Config calls set_flags, but that does not get the Queue
* specific flags. No harm in calling it again.
*/
db.set_flags(cfg.flags);
@@ -51,13 +51,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file that is used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -80,15 +80,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation is
+ /// implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file that is used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -129,7 +129,7 @@ namespace BerkeleyDB {
/// <summary>
/// If true, modify the operation of <see cref="QueueDatabase.Consume"/>
- /// to return key/data pairs in order. That is, they will always return
+ /// to return key/data pairs in order. They always return
/// the key/data item from the head of the queue.
/// </summary>
public bool InOrder {
@@ -180,8 +180,8 @@ namespace BerkeleyDB {
/// <see cref="RecnoDatabase.Append"/> and
/// <see cref="QueueDatabase.Append"/>. If a transaction enclosing an
/// Append operation aborts, the record number may be reallocated in a
- /// subsequent <see cref="RecnoDatabase.Append"/> operation, but it will
- /// not be reallocated in a subsequent
+ /// subsequent <see cref="RecnoDatabase.Append"/> operation, but it
+ /// is not reallocated in a subsequent
/// <see cref="QueueDatabase.Append"/> operation.
/// </remarks>
/// <param name="data">The data item to store in the database</param>
@@ -205,8 +205,8 @@ namespace BerkeleyDB {
/// to the head of the queue, and delete the record.
/// </summary>
/// <param name="wait">
- /// If true and the Queue database is empty, the thread of control will
- /// wait until there is data in the queue before returning.
+ /// If true and the Queue database is empty, the thread of control
+ /// waits until there is data in the queue before returning.
/// </param>
/// <exception cref="LockNotGrantedException">
/// If lock or transaction timeouts have been specified, a
@@ -226,8 +226,8 @@ namespace BerkeleyDB {
/// to the head of the queue, and delete the record.
/// </summary>
/// <param name="wait">
- /// If true and the Queue database is empty, the thread of control will
- /// wait until there is data in the queue before returning.
+ /// If true and the Queue database is empty, the thread of control
+ /// waits until there is data in the queue before returning.
/// </param>
/// <param name="txn">
/// <paramref name="txn"/> is a Transaction object returned from
@@ -255,8 +255,8 @@ namespace BerkeleyDB {
/// to the head of the queue, and delete the record.
/// </summary>
/// <param name="wait">
- /// If true and the Queue database is empty, the thread of control will
- /// wait until there is data in the queue before returning.
+ /// If true and the Queue database is empty, the thread of control
+ /// waits until there is data in the queue before returning.
/// </param>
/// <param name="txn">
/// <paramref name="txn"/> is a Transaction object returned from
diff --git a/lang/csharp/src/QueueDatabaseConfig.cs b/lang/csharp/src/QueueDatabaseConfig.cs
index 95caa259..c284f163 100644
--- a/lang/csharp/src/QueueDatabaseConfig.cs
+++ b/lang/csharp/src/QueueDatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -17,13 +17,13 @@ namespace BerkeleyDB {
/* Fields for DB->set_flags() */
/// <summary>
/// If true, modify the operation of <see cref="QueueDatabase.Consume"/>
- /// to return key/data pairs in order. That is, they will always return
+ /// to return key/data pairs in order. They always return
/// the key/data item from the head of the queue.
/// </summary>
/// <remarks>
/// <para>
/// The default behavior of queue databases is optimized for multiple
- /// readers, and does not guarantee that record will be retrieved in the
+ /// readers, and does not guarantee records to be retrieved in the
/// order they are added to the queue. Specifically, if a writing thread
/// adds multiple records to an empty queue, reading threads may skip
/// some of the initial records when the next
@@ -32,7 +32,7 @@ namespace BerkeleyDB {
/// <para>
/// This setting modifies <see cref="QueueDatabase.Consume"/> to verify
/// that the record being returned is in fact the head of the queue.
- /// This will increase contention and reduce concurrency when there are
+ /// This increases contention and reduces concurrency when there are
/// many reading threads.
/// </para>
/// </remarks>
@@ -51,7 +51,7 @@ namespace BerkeleyDB {
/// <remarks>
/// If the database does not already exist and
/// <see cref="CreatePolicy.NEVER"/> is set,
- /// <see cref="QueueDatabase.Open"/> will fail.
+ /// <see cref="QueueDatabase.Open"/> fails.
/// </remarks>
public CreatePolicy Creation;
internal new uint openFlags {
@@ -70,7 +70,7 @@ namespace BerkeleyDB {
/// <para>
/// When using <see cref="QueueDatabase.Append"/>, it may be useful to
/// modify the stored data based on the generated key. If a delegate is
- /// specified, it will be called after the record number has been
+ /// specified, it is called after the record number has been
/// selected, but before the data has been stored.
/// </para>
/// </remarks>
@@ -94,11 +94,11 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// Any attempt to insert records into the database that are greater
- /// than Length bytes long will cause the call to fail immediately and
+ /// than Length bytes long causes the call to fail immediately and
/// return an error.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public uint Length {
@@ -113,11 +113,11 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// If no pad character is specified, space characters (that is, ASCII
+ /// If no pad character is specified, space characters (ASCII
/// 0x20) are used for padding.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public int PadByte {
@@ -145,7 +145,7 @@ namespace BerkeleyDB {
/// size in the Programmer's Reference Guide.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public uint ExtentSize {
diff --git a/lang/csharp/src/QueueStats.cs b/lang/csharp/src/QueueStats.cs
index 471ebc42..2c3f948a 100644
--- a/lang/csharp/src/QueueStats.cs
+++ b/lang/csharp/src/QueueStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/RecnoCursor.cs b/lang/csharp/src/RecnoCursor.cs
index de0e0e5f..461481c1 100644
--- a/lang/csharp/src/RecnoCursor.cs
+++ b/lang/csharp/src/RecnoCursor.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -30,9 +30,9 @@ namespace BerkeleyDB {
/// <param name="keepPosition">
/// If true, the newly created cursor is initialized to refer to the
/// same position in the database as the original cursor (if any) and
- /// hold the same locks (if any). If false, or the original cursor does
+ /// hold the same locks (if any). If false, or if the original cursor does
/// not hold a database position and locks, the created cursor is
- /// uninitialized and will behave like a cursor newly created by
+ /// uninitialized and behaves like a cursor newly created by
/// <see cref="RecnoDatabase.Cursor"/>.</param>
/// <returns>A newly created cursor</returns>
public new RecnoCursor Duplicate(bool keepPosition) {
diff --git a/lang/csharp/src/RecnoDatabase.cs b/lang/csharp/src/RecnoDatabase.cs
index 08e5ad04..8cf539ce 100644
--- a/lang/csharp/src/RecnoDatabase.cs
+++ b/lang/csharp/src/RecnoDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -27,7 +27,7 @@ namespace BerkeleyDB {
private void Config(RecnoDatabaseConfig cfg) {
base.Config(cfg);
/*
- * Database.Config calls set_flags, but that doesn't get the Recno
+ * Database.Config calls set_flags, but that does not get the Recno
* specific flags. No harm in calling it again.
*/
db.set_flags(cfg.flags);
@@ -55,13 +55,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -90,13 +90,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -125,15 +125,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -170,15 +170,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation is
+ /// implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -303,7 +303,7 @@ namespace BerkeleyDB {
}
/// <summary>
- /// If true, any <see cref="SourceFile"/> file will be read in its
+ /// If true, any <see cref="SourceFile"/> file is read in its
/// entirety when <see cref="Open"/> is called. If false,
/// <see cref="SourceFile"/> may be read lazily.
/// </summary>
@@ -348,8 +348,8 @@ namespace BerkeleyDB {
/// <see cref="RecnoDatabase.Append"/> and
/// <see cref="QueueDatabase.Append"/>. If a transaction enclosing an
/// Append operation aborts, the record number may be reallocated in a
- /// subsequent <see cref="RecnoDatabase.Append"/> operation, but it will
- /// not be reallocated in a subsequent
+ /// subsequent <see cref="RecnoDatabase.Append"/> operation, but it
+ /// is not reallocated in a subsequent
/// <see cref="QueueDatabase.Append"/> operation.
/// </remarks>
/// <param name="data">The data item to store in the database</param>
@@ -374,8 +374,8 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// If the operation occurs in a transactional database, the operation
- /// will be implicitly transaction protected using multiple
- /// transactions. These transactions will be periodically committed to
+ /// is implicitly transaction protected using multiple
+ /// transactions. These transactions are periodically committed to
/// avoid locking large sections of the tree. Any deadlocks encountered
/// cause the compaction operation to be retried from the point of the
/// last transaction commit.
@@ -397,8 +397,8 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but the operation occurs in a
- /// transactional database, the operation will be implicitly transaction
- /// protected using multiple transactions. These transactions will be
+ /// transactional database, the operation is implicitly transaction
+ /// protected using multiple transactions. These transactions are
/// periodically committed to avoid locking large sections of the tree.
/// Any deadlocks encountered cause the compaction operation to be
/// retried from the point of the last transaction commit.
@@ -530,7 +530,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="isoDegree">
/// The level of isolation for database reads.
- /// <see cref="Isolation.DEGREE_ONE"/> will be silently ignored for
+ /// <see cref="Isolation.DEGREE_ONE"/> is silently ignored for
/// databases which did not specify
/// <see cref="DatabaseConfig.ReadUncommitted"/>.
/// </param>
@@ -581,7 +581,7 @@ namespace BerkeleyDB {
/// </param>
/// <param name="isoDegree">
/// The level of isolation for database reads.
- /// <see cref="Isolation.DEGREE_ONE"/> will be silently ignored for
+ /// <see cref="Isolation.DEGREE_ONE"/> is silently ignored for
/// databases which did not specify
/// <see cref="DatabaseConfig.ReadUncommitted"/>.
/// </param>
diff --git a/lang/csharp/src/RecnoDatabaseConfig.cs b/lang/csharp/src/RecnoDatabaseConfig.cs
index be895ab3..423a6d73 100644
--- a/lang/csharp/src/RecnoDatabaseConfig.cs
+++ b/lang/csharp/src/RecnoDatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -16,46 +16,46 @@ namespace BerkeleyDB {
public class RecnoDatabaseConfig : DatabaseConfig {
/* Fields for DB->set_flags() */
/// <summary>
- /// Cause the logical record numbers to be mutable, and change as
+ /// Causes the logical record numbers to be mutable, and change as
/// records are added to and deleted from the database.
/// </summary>
/// <remarks>
/// <para>
/// Using <see cref="Database.Put"/> or <see cref="Cursor.Put"/> to
- /// create new records will cause the creation of multiple records if
+ /// create new records causes the creation of multiple records if
/// the record number is more than one greater than the largest record
- /// currently in the database. For example, creating record 28, when
- /// record 25 was previously the last record in the database, will
- /// create records 26 and 27 as well as 28. Attempts to retrieve records
- /// that were created in this manner will throw a
+ /// currently in the database. For example, creating record 28 when
+ /// record 25 was previously the last record in the database
+ /// creates records 26 and 27 as well as 28. Attempts to retrieve records
+ /// that were created in this manner throw a
/// <see cref="KeyEmptyException"/>.
/// </para>
/// <para>
/// If a created record is not at the end of the database, all records
- /// following the new record will be automatically renumbered upward by
+ /// following the new record are automatically renumbered upward by
/// one. For example, the creation of a new record numbered 8 causes
/// records numbered 8 and greater to be renumbered upward by one. If a
/// cursor was positioned to record number 8 or greater before the
- /// insertion, it will be shifted upward one logical record, continuing
+ /// insertion, it is shifted upward one logical record, continuing
/// to refer to the same record as it did before.
/// </para>
/// <para>
/// If a deleted record is not at the end of the database, all records
- /// following the removed record will be automatically renumbered
+ /// following the removed record are automatically renumbered
/// downward by one. For example, deleting the record numbered 8 causes
/// records numbered 9 and greater to be renumbered downward by one. If
/// a cursor was positioned to record number 9 or greater before the
- /// removal, it will be shifted downward one logical record, continuing
+ /// removal, it is shifted downward one logical record, continuing
/// to refer to the same record as it did before.
/// </para>
/// <para>
/// If a record is deleted, all cursors that were positioned on that
- /// record prior to the removal will no longer be positioned on a valid
+ /// record prior to the removal are no longer positioned on a valid
/// entry. This includes cursors used to delete an item. For example, if
/// a cursor was positioned to record number 8 before the removal of
/// that record, subsequent calls to <see cref="Cursor.Refresh"/>
- /// will return false until the cursor is moved to another record. A
- /// call to <see cref="Cursor.MoveNext"/> will return the new record
+ /// returns false until the cursor is moved to another record. A
+ /// call to <see cref="Cursor.MoveNext"/> returns the new record
/// numbered 8 - which is the record that was numbered 9 prior to the
/// delete (if such a record existed).
/// </para>
@@ -66,12 +66,12 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If the database already exists, this setting must be the same as the
- /// existing database or an exception will be thrown.
+ /// existing database or an exception is thrown.
/// </para>
/// </remarks>
public bool Renumber;
/// <summary>
- /// If true, any <see cref="BackingFile"/> file will be read in its
+ /// If true, any <see cref="BackingFile"/> file is read in its
/// entirety when <see cref="RecnoDatabase.Open"/> is called. If false,
/// <see cref="BackingFile"/> may be read lazily.
/// </summary>
@@ -91,7 +91,7 @@ namespace BerkeleyDB {
/// <remarks>
/// If the database does not already exist and
/// <see cref="CreatePolicy.NEVER"/> is set,
- /// <see cref="RecnoDatabase.Open"/> will fail.
+ /// <see cref="RecnoDatabase.Open"/> fails.
/// </remarks>
public CreatePolicy Creation;
internal new uint openFlags {
@@ -110,7 +110,7 @@ namespace BerkeleyDB {
/// <para>
/// When using <see cref="QueueDatabase.Append"/>, it may be useful to
/// modify the stored data based on the generated key. If a delegate is
- /// specified, it will be called after the record number has been
+ /// specified, it is called after the record number has been
/// selected, but before the data has been stored.
/// </para>
/// </remarks>
@@ -127,10 +127,10 @@ namespace BerkeleyDB {
/// This byte is used for variable length records if
/// <see cref="BackingFile"/> is set. If <see cref="BackingFile"/> is
/// specified and no delimiting byte was specified, newline characters
- /// (that is, ASCII 0x0a) are interpreted as end-of-record markers.
+ /// (ASCII 0x0a) are interpreted as end-of-record markers.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public int Delimiter {
@@ -155,11 +155,11 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// Any attempt to insert records into the database that are greater
- /// than Length bytes long will cause the call to fail immediately and
+ /// than Length bytes long cause the call to fail immediately and
/// return an error.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public uint Length {
@@ -177,11 +177,11 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// If no pad character is specified, space characters (that is, ASCII
+ /// If no pad character is specified, space characters (ASCII
/// 0x20) are used for padding.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public int PadByte {
@@ -214,10 +214,10 @@ namespace BerkeleyDB {
/// underlying database file (for example,
/// <see cref="BaseDatabase.Close"/> or
/// <see cref="BaseDatabase.Sync"/>), the in-memory copy of the
- /// database will be written back to the source file.
+ /// database is written back to the source file.
/// </para>
/// <para>
- /// By default, the backing source file is read lazily; that is, records
+ /// By default, the backing source file is read lazily; records
/// are not read from the file until they are requested by the
/// application. If multiple processes (not threads) are accessing a
/// Recno database concurrently, and are either inserting or deleting
@@ -236,7 +236,7 @@ namespace BerkeleyDB {
/// the system crashes at the right instant. If a file is used to hold
/// the database, normal database recovery on that file can be used to
/// prevent information loss, although it is still possible that the
- /// contents of source will be lost if the system crashes.
+ /// contents of source are lost if the system crashes.
/// </para>
/// <para>
/// The source file must already exist (but may be zero-length) when
@@ -247,10 +247,10 @@ namespace BerkeleyDB {
/// a database, nor is it an error to modify the resulting database.
/// However, any attempt to write the changes to the backing source file
/// using either the <see cref="BaseDatabase.Sync"/> or
- /// <see cref="BaseDatabase.Close"/> methods will fail, of course.
+ /// <see cref="BaseDatabase.Close"/> methods fail, of course.
/// Use <see cref="BaseDatabase.Close(bool)"/> to stop it from
/// attempting to write the changes to the backing file; instead, they
- /// will be silently discarded.
+ /// are silently discarded.
/// </para>
/// <para>
/// For all of the previous reasons, the source file is generally used
diff --git a/lang/csharp/src/RecnoStats.cs b/lang/csharp/src/RecnoStats.cs
index 1ac0ffc8..c3a35d3a 100644
--- a/lang/csharp/src/RecnoStats.cs
+++ b/lang/csharp/src/RecnoStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/RepMgrSite.cs b/lang/csharp/src/RepMgrSite.cs
index 0cd4b050..41bf1a0e 100644
--- a/lang/csharp/src/RepMgrSite.cs
+++ b/lang/csharp/src/RepMgrSite.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -11,7 +11,7 @@ using BerkeleyDB.Internal;
namespace BerkeleyDB {
/// <summary>
- /// A class representing a replication site used by Replication Manager
+ /// A class representing a replication site used by Replication Manager.
/// </summary>
public class RepMgrSite {
@@ -23,7 +23,7 @@ namespace BerkeleyDB {
/// </summary>
public int EId;
/// <summary>
- /// The address of the site
+ /// The address of the site.
/// </summary>
public ReplicationHostAddress Address;
/// <summary>
@@ -34,12 +34,17 @@ namespace BerkeleyDB {
/// If true, the site is client-to-client peer.
/// </summary>
public bool isPeer;
+ /// <summary>
+ /// If true, the site is a view site.
+ /// </summary>
+ public bool isView;
internal RepMgrSite(DB_REPMGR_SITE site) {
EId = site.eid;
Address = new ReplicationHostAddress(site.host, site.port);
isConnected = (site.status == DbConstants.DB_REPMGR_CONNECTED);
- isPeer = (site.flags & DbConstants.DB_REPMGR_PEER) != 0;
+ isPeer = (site.flags & DbConstants.DB_REPMGR_ISPEER) != 0;
+ isView = (site.flags & DbConstants.DB_REPMGR_ISVIEW) != 0;
}
}
}
diff --git a/lang/csharp/src/RepMgrStats.cs b/lang/csharp/src/RepMgrStats.cs
index 1d5cbcab..1b748235 100644
--- a/lang/csharp/src/RepMgrStats.cs
+++ b/lang/csharp/src/RepMgrStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -17,13 +17,16 @@ namespace BerkeleyDB {
internal RepMgrStats(Internal.RepMgrStatStruct stats) {
st = stats;
}
-
+ /// <summary>
+ /// Number of automatic replication process takeovers.
+ /// </summary>
+ public ulong AutoTakeovers { get { return st.st_takeovers; } }
/// <summary>
/// Existing connections dropped.
/// </summary>
public ulong DroppedConnections { get { return st.st_connection_drop; } }
/// <summary>
- /// # msgs discarded due to excessive queue length.
+ /// Number of messages discarded due to excessive queue length.
/// </summary>
public ulong DroppedMessages { get { return st.st_msgs_dropped; } }
/// <summary>
@@ -31,21 +34,45 @@ namespace BerkeleyDB {
/// </summary>
public ulong FailedConnections { get { return st.st_connect_fail; } }
/// <summary>
- /// # of insufficiently ack'ed msgs.
+ /// Number of insufficiently acknowledged messages.
/// </summary>
public ulong FailedMessages { get { return st.st_perm_failed; } }
/// <summary>
- /// # msgs queued for network delay.
+ /// Number of messages queued for network delay.
/// </summary>
public ulong QueuedMessages { get { return st.st_msgs_queued; } }
/// <summary>
+ /// Incoming queue size: Gigabytes.
+ /// </summary>
+ public ulong IncomingQueueGBytes { get { return st.st_incoming_queue_gbytes; } }
+ /// <summary>
+ /// Incoming queue size: Gytes.
+ /// </summary>
+ public ulong IncomingQueueBytes { get { return st.st_incoming_queue_bytes; } }
+ /// <summary>
+ /// Number of msgs discarded due to incoming queue full.
+ /// </summary>
+ public ulong IncomingDroppedMessages { get { return st.st_incoming_msgs_dropped; } }
+ /// <summary>
/// Number of currently active election threads
/// </summary>
- public ulong ElectionThreads { get { return st.st_elect_threads; } }
+ public uint ElectionThreads { get { return st.st_elect_threads; } }
/// <summary>
/// Election threads for which space is reserved
/// </summary>
- public ulong MaxElectionThreads { get { return st.st_max_elect_threads; } }
+ public uint MaxElectionThreads { get { return st.st_max_elect_threads; } }
+ /// <summary>
+ /// Number of replication group participant sites.
+ /// </summary>
+ public uint ParticipantSites { get { return st.st_site_participants; } }
+ /// <summary>
+ /// Total number of replication group sites.
+ /// </summary>
+ public uint TotalSites { get { return st.st_site_total; } }
+ /// <summary>
+ /// Number of replication group view sites.
+ /// </summary>
+ public uint ViewSites { get { return st.st_site_views; } }
}
}
diff --git a/lang/csharp/src/RepProcMsgResult.cs b/lang/csharp/src/RepProcMsgResult.cs
index 19928928..bd17b552 100644
--- a/lang/csharp/src/RepProcMsgResult.cs
+++ b/lang/csharp/src/RepProcMsgResult.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/ReplicationConfig.cs b/lang/csharp/src/ReplicationConfig.cs
index f0f9f9b9..bcc7b547 100644
--- a/lang/csharp/src/ReplicationConfig.cs
+++ b/lang/csharp/src/ReplicationConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -27,13 +27,13 @@ namespace BerkeleyDB {
#region Config Flags
/// <summary>
- /// If true, the replication master will send groups of records to the
+ /// If true, the replication master sends groups of records to the
/// clients in a single network transfer
/// </summary>
public bool BulkTransfer;
/// <summary>
- /// If true, the client will delay synchronizing to a newly declared
- /// master (defaults to false). Clients configured in this way will
+ /// If true, the client delays synchronizing to a newly declared
+ /// master (defaults to false). Clients configured in this way
/// remain unsynchronized until the application calls
/// <see cref="DatabaseEnvironment.RepSync"/>.
/// </summary>
@@ -48,7 +48,7 @@ namespace BerkeleyDB {
/// </summary>
public bool InMemory;
/// <summary>
- /// If true, master leases will be used for this site (defaults to
+ /// If true, master leases are used for this site (defaults to
/// false).
/// </summary>
/// <remarks>
@@ -58,7 +58,7 @@ namespace BerkeleyDB {
/// </remarks>
public bool UseMasterLeases;
/// <summary>
- /// If true, the replication master will automatically re-initialize
+ /// If true, the replication master automatically re-initializes
/// outdated clients (defaults to true).
/// </summary>
public bool AutoInit;
@@ -69,9 +69,9 @@ namespace BerkeleyDB {
/// </summary>
public bool NoBlocking;
/// <summary>
- /// If true, the Replication Manager will observe the strict "majority"
+ /// If true, the Replication Manager observes the strict "majority"
/// rule in managing elections, even in a group with only 2 sites. This
- /// means the client in a 2-site group will be unable to take over as
+ /// means the client in a 2-site group is unable to take over as
/// master if the original master fails or becomes disconnected. (See
/// the Elections section in the Berkeley DB Reference Guide for more
/// information.) Both sites in the replication group should have the
@@ -84,6 +84,25 @@ namespace BerkeleyDB {
/// have become disconnected (defaults to true).
/// </summary>
public bool Elections;
+ /// <summary>
+ /// This flag is used to specify the preferred master site in a
+ /// replication group operating in preferred master mode. A preferred
+ /// master replication group must contain only two sites, with one site
+ /// specified as the preferred master site and the other site specified
+ /// as the client site. The preferred master site operates as the
+ /// master site whenever possible.
+ /// </summary>
+ public bool PrefmasMaster;
+ /// <summary>
+ /// This flag is used to specify the client site in a replication group
+ /// operating in preferred master mode. A preferred master replication
+ /// group must contain only two sites, with one site specified as the
+ /// preferred master site and the other site specified as the client
+ /// site. The client site in a preferred master replication group takes
+ /// over temporarily as master when the preferred master site is
+ /// unavailable.
+ /// </summary>
+ public bool PrefmasClient;
#endregion Config Flags
#region Timeout Values
@@ -106,14 +125,14 @@ namespace BerkeleyDB {
private uint _checkpointDelay;
internal bool checkpointDelayIsSet;
/// <summary>
- /// The amount of time a master site will delay between completing a
+ /// The amount of time a master site delays between completing a
/// checkpoint and writing a checkpoint record into the log.
/// </summary>
/// <remarks>
/// This delay allows clients to complete their own checkpoints before
/// the master requires completion of them. The default is 30 seconds.
/// If all databases in the environment, and the environment's
- /// transaction log, are configured to reside in memory (never preserved
+ /// transaction log, are configured to reside in-memory (never preserved
/// to disk), then, although checkpoints are still necessary, the delay
/// is not useful and should be set to 0.
/// </remarks>
@@ -128,7 +147,7 @@ namespace BerkeleyDB {
private uint _connectionRetry;
internal bool connectionRetryIsSet;
/// <summary>
- /// The amount of time the replication manager will wait before trying
+ /// The amount of time the replication manager waits before trying
/// to re-establish a connection to another site after a communication
/// failure. The default wait time is 30 seconds.
/// </summary>
@@ -157,7 +176,7 @@ namespace BerkeleyDB {
private uint _electionRetry;
internal bool electionRetryIsSet;
/// <summary>
- /// Configure the amount of time the replication manager will wait
+ /// Configure the amount of time the replication manager waits
/// before retrying a failed election. The default wait time is 10
/// seconds.
/// </summary>
@@ -208,7 +227,7 @@ namespace BerkeleyDB {
/// <summary>
/// The frequency at which the replication manager, running at a master
/// site, broadcasts a heartbeat message in an otherwise idle system.
- /// When 0 (the default), no heartbeat messages will be sent.
+ /// When 0 (the default), no heartbeat messages are sent.
/// </summary>
public uint HeartbeatSend {
get { return _heartbeatSend; }
@@ -325,6 +344,25 @@ namespace BerkeleyDB {
}
}
+ private ReplicationViewDelegate replicationView;
+ internal bool repViewIsSet;
+ /// <summary>
+ /// Create a replication view and specify the function to determine
+ /// whether a database file is replicated to the local site.
+ /// </summary>
+ /// <remarks>
+ /// If it is null, the replication view is a full view and all database
+ /// files are replicated to the local site. Otherwise it is a partial
+ /// view and only some database files are replicated to the local site.
+ /// </remarks>
+ public ReplicationViewDelegate ReplicationView {
+ get { return replicationView; }
+ set {
+ repViewIsSet = true;
+ replicationView = value;
+ }
+ }
+
private uint _retransmissionRequestMin;
private uint _retransmissionRequestMax;
internal bool retransmissionRequestIsSet;
@@ -349,9 +387,9 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// If the client detects a gap in the sequence of incoming log records
- /// or database pages, Berkeley DB will wait for at least
+ /// or database pages, Berkeley DB waits for at least
/// <paramref name="min"/> microseconds before requesting retransmission
- /// of the missing record. Berkeley DB will double that amount before
+ /// of the missing record. Berkeley DB doubles that amount before
/// requesting the same missing record again, and so on, up to a
/// maximum threshold of <paramref name="max"/> microseconds.
/// </para>
@@ -393,20 +431,20 @@ namespace BerkeleyDB {
internal bool transmitLimitIsSet;
/// <summary>
/// The gigabytes component of the byte-count limit on the amount of
- /// data that will be transmitted from a site in response to a single
+ /// data that is transmitted from a site in response to a single
/// message processed by
/// <see cref="DatabaseEnvironment.RepProcessMessage"/>.
/// </summary>
public uint TransmitLimitGBytes { get { return _gbytes; } }
/// <summary>
/// The bytes component of the byte-count limit on the amount of data
- /// that will be transmitted from a site in response to a single
+ /// that is transmitted from a site in response to a single
/// message processed by
/// <see cref="DatabaseEnvironment.RepProcessMessage"/>.
/// </summary>
public uint TransmitLimitBytes { get { return _bytes; } }
/// <summary>
- /// Set a byte-count limit on the amount of data that will be
+ /// Set a byte-count limit on the amount of data that is
/// transmitted from a site in response to a single message processed by
/// <see cref="DatabaseEnvironment.RepProcessMessage"/>. The limit is
/// not a hard limit, and the record that exceeds the limit is the last
@@ -425,13 +463,13 @@ namespace BerkeleyDB {
/// <param name="GBytes">
/// The number of gigabytes which, when added to
/// <paramref name="Bytes"/>, specifies the maximum number of bytes that
- /// will be sent in a single call to
+ /// are sent in a single call to
/// <see cref="DatabaseEnvironment.RepProcessMessage"/>.
/// </param>
/// <param name="Bytes">
/// The number of bytes which, when added to
/// <paramref name="GBytes"/>, specifies the maximum number of bytes
- /// that will be sent in a single call to
+ /// that are sent in a single call to
/// <see cref="DatabaseEnvironment.RepProcessMessage"/>.
/// </param>
public void TransmitLimit(uint GBytes, uint Bytes) {
@@ -440,6 +478,50 @@ namespace BerkeleyDB {
_bytes = Bytes;
}
+ private uint _inqmaxgbytes;
+ private uint _inqmaxbytes;
+ internal bool repmgrIncomingQueueMaxIsSet;
+ /// <summary>
+ /// The gigabytes component of the maximum amount of dynamic memory
+ /// used by the Replication Manager incoming queue.
+ /// </summary>
+ public uint RepmgrIncomingQueueMaxGBytes { get { return _inqmaxgbytes; } }
+ /// <summary>
+ /// The bytes component of the maximum amount of dynamic memory
+ /// used by the Replication Manager incoming queue.
+ /// </summary>
+ public uint RepmgrIncomingQueueMaxBytes { get { return _inqmaxbytes; } }
+ /// <summary>
+ /// Set a byte-count limit on the maximum amount of dynamic memory
+ /// used by the Replication Manager incoming queue.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// By default, the Replication Manager incoming queue size has a
+ /// limit of 100MB.
+ /// </para>
+ /// <para>
+ /// If both <paramref name="GBytes"/> and <paramref name="Bytes"/> are
+ /// zero, then the Replication Manager incoming queue size is limited
+ /// by available heap memory.
+ /// </para>
+ /// </remarks>
+ /// <param name="GBytes">
+ /// The number of gigabytes which, when added to
+ /// <paramref name="Bytes"/>, specifies the maximum amount of dynamic
+ /// memory used by the Replication Manager incoming queue.
+ /// </param>
+ /// <param name="Bytes">
+ /// The number of bytes which, when added to
+ /// <paramref name="GBytes"/>, specifies the maximum amount of dynamic
+ /// memory used by the Replication Manager incoming queue.
+ /// </param>
+ public void RepmgrIncomingQueueMax(uint GBytes, uint Bytes) {
+ repmgrIncomingQueueMaxIsSet = true;
+ _inqmaxgbytes = GBytes;
+ _inqmaxbytes = Bytes;
+ }
+
/// <summary>
/// The delegate used to transmit data using the replication
/// application's communication infrastructure.
@@ -447,10 +529,10 @@ namespace BerkeleyDB {
public ReplicationTransportDelegate Transport;
/// <summary>
- /// Specify how master and client sites will handle acknowledgment of
- /// replication messages which are necessary for "permanent" records.
+ /// Specify how master and client sites handle the acknowledgment of
+ /// replication messages which is necessary for "permanent" records.
/// The current implementation requires all sites in a replication group
- /// configure the same acknowledgement policy.
+ /// to configure the same acknowledgement policy.
/// </summary>
/// <seealso cref="AckTimeout"/>
public AckPolicy RepMgrAckPolicy;
diff --git a/lang/csharp/src/ReplicationHostAddress.cs b/lang/csharp/src/ReplicationHostAddress.cs
index 594a2c66..636cdef5 100644
--- a/lang/csharp/src/ReplicationHostAddress.cs
+++ b/lang/csharp/src/ReplicationHostAddress.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/ReplicationStats.cs b/lang/csharp/src/ReplicationStats.cs
index 7b25b010..cc1fad57 100644
--- a/lang/csharp/src/ReplicationStats.cs
+++ b/lang/csharp/src/ReplicationStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -45,7 +45,7 @@ namespace BerkeleyDB {
/// </summary>
public LSN NextLSN { get { return next; } }
/// <summary>
- /// LSN we're awaiting, if any.
+ /// Awaited LSN, if any.
/// </summary>
public LSN AwaitedLSN { get { return waiting; } }
/// <summary>
@@ -53,15 +53,15 @@ namespace BerkeleyDB {
/// </summary>
public LSN MaxPermanentLSN { get { return maxPerm; } }
/// <summary>
- /// Next pg we expect.
+ /// Next page expected.
/// </summary>
public uint NextPage { get { return st.st_next_pg; } }
/// <summary>
- /// pg we're awaiting, if any.
+ /// Awaited Page, if any.
/// </summary>
public uint AwaitedPage { get { return st.st_waiting_pg; } }
/// <summary>
- /// # of times a duplicate master condition was detected.
+ /// Number of times a duplicate master condition was detected.
/// </summary>
public uint DupMasters { get { return st.st_dupmasters; } }
/// <summary>
@@ -129,11 +129,11 @@ namespace BerkeleyDB {
/// </summary>
public ulong LeaseSentNumber { get { return st.st_lease_sends; } }
/// <summary>
- /// Max. log records queued at once.
+ /// Maximum log records queued at once.
/// </summary>
public ulong MaxQueuedLogRecords { get { return st.st_log_queued_max; } }
/// <summary>
- /// Total # of log recs. ever queued.
+ /// Total number of log records ever queued.
/// </summary>
public ulong QueuedLogRecords { get { return st.st_log_queued_total; } }
/// <summary>
@@ -141,7 +141,7 @@ namespace BerkeleyDB {
/// </summary>
public ulong ReceivedLogRecords { get { return st.st_log_records; } }
/// <summary>
- /// Log recs. missed and requested.
+ /// Log records missed and requested.
/// </summary>
public ulong MissedLogRecords { get { return st.st_log_requested; } }
/// <summary>
@@ -149,11 +149,11 @@ namespace BerkeleyDB {
/// </summary>
public long MasterEnvID { get { return st.st_master.ToInt64(); } }
/// <summary>
- /// # of times we've switched masters.
+ /// Number of times masters have switched.
/// </summary>
public ulong MasterChanges { get { return st.st_master_changes; } }
/// <summary>
- /// Messages with a bad generation #.
+ /// Messages with a bad generation number.
/// </summary>
public ulong BadGenerationMessages { get { return st.st_msgs_badgen; } }
/// <summary>
@@ -165,27 +165,27 @@ namespace BerkeleyDB {
/// </summary>
public ulong IgnoredMessages { get { return st.st_msgs_recover; } }
/// <summary>
- /// # of failed message sends.
+ /// Number of failed message sends.
/// </summary>
public ulong FailedMessageSends { get { return st.st_msgs_send_failures; } }
/// <summary>
- /// # of successful message sends.
+ /// Number of successful message sends.
/// </summary>
public ulong MessagesSent { get { return st.st_msgs_sent; } }
/// <summary>
- /// # of NEWSITE msgs. received.
+ /// Number of NEWSITE messages received.
/// </summary>
public ulong NewSiteMessages { get { return st.st_newsites; } }
/// <summary>
- /// Current number of sites we will assume during elections.
+ /// Current number of sites assumed during elections.
/// </summary>
public uint Sites { get { return st.st_nsites; } }
/// <summary>
- /// # of times we were throttled.
+ /// Number of throttled times.
/// </summary>
public ulong Throttled { get { return st.st_nthrottles; } }
/// <summary>
- /// # of times we detected and returned an OUTDATED condition.
+ /// Number of times an OUTDATED condition is detected and returned
/// </summary>
public ulong Outdated { get { return st.st_outdated; } }
/// <summary>
@@ -201,21 +201,21 @@ namespace BerkeleyDB {
/// </summary>
public ulong MissedPages { get { return st.st_pg_requested; } }
/// <summary>
- /// # of transactions applied.
+ /// Number of transactions applied.
/// </summary>
public ulong AppliedTransactions { get { return st.st_txns_applied; } }
/// <summary>
- /// # of STARTSYNC msgs delayed.
+ /// Number of STARTSYNC msgs delayed.
/// </summary>
public ulong StartSyncMessagesDelayed { get { return st.st_startsync_delayed; } }
/* Elections generally. */
/// <summary>
- /// # of elections held.
+ /// Number of elections held.
/// </summary>
public ulong Elections { get { return st.st_elections; } }
/// <summary>
- /// # of elections won by this site.
+ /// Number of elections won by this site.
/// </summary>
public ulong ElectionsWon { get { return st.st_elections_won; } }
@@ -233,15 +233,15 @@ namespace BerkeleyDB {
/// </summary>
public uint ElectionDataGeneration { get { return st.st_election_datagen; } }
/// <summary>
- /// Max. LSN of current winner.
+ /// Maximum LSN of current winner.
/// </summary>
public LSN CurrentWinnerMaxLSN { get { return winner; } }
/// <summary>
- /// # of "registered voters".
+ /// Number of "registered voters".
/// </summary>
public uint RegisteredSites { get { return st.st_election_nsites; } }
/// <summary>
- /// # of "registered voters" needed.
+ /// Number of "registered voters" needed.
/// </summary>
public uint RegisteredSitesNeeded { get { return st.st_election_nvotes; } }
/// <summary>
@@ -276,5 +276,10 @@ namespace BerkeleyDB {
/// Maximum lease timestamp useconds.
/// </summary>
public uint MaxLeaseUSec { get { return st.st_max_lease_usec; } }
+
+ /// <summary>
+ /// True if the site is a view and false if not.
+ /// </summary>
+ public bool View { get { return (st.st_view != 0); } }
}
-} \ No newline at end of file
+}
diff --git a/lang/csharp/src/SecondaryBTreeDatabase.cs b/lang/csharp/src/SecondaryBTreeDatabase.cs
index b685747d..b89f66df 100644
--- a/lang/csharp/src/SecondaryBTreeDatabase.cs
+++ b/lang/csharp/src/SecondaryBTreeDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -54,13 +54,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -85,18 +85,18 @@ namespace BerkeleyDB {
/// object that created it, in circumstances where doing so is safe. If
/// <paramref name="Filename"/> is null and
/// <paramref name="DatabaseName"/> is non-null, the database can be
- /// opened by other threads of control and will be replicated to client
+ /// opened by other threads of control and be replicated to client
/// sites in any replication group.
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -127,15 +127,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -168,20 +168,20 @@ namespace BerkeleyDB {
/// object that created it, in circumstances where doing so is safe. If
/// <paramref name="Filename"/> is null and
/// <paramref name="DatabaseName"/> is non-null, the database can be
- /// opened by other threads of control and will be replicated to client
+ /// opened by other threads of control and be replicated to client
/// sites in any replication group.
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -230,18 +230,23 @@ namespace BerkeleyDB {
#region Callbacks
private static int doDupCompare(
- IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p) {
+ IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p, IntPtr locp) {
DB db = new DB(dbp, false);
DBT dbt1 = new DBT(dbt1p, false);
DBT dbt2 = new DBT(dbt2p, false);
+ if (locp != IntPtr.Zero)
+ locp = IntPtr.Zero;
return ((SecondaryBTreeDatabase)(db.api_internal)).DupCompare(
DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2));
}
- private static int doCompare(IntPtr dbp, IntPtr dbtp1, IntPtr dbtp2) {
+ private static int doCompare(IntPtr dbp,
+ IntPtr dbtp1, IntPtr dbtp2, IntPtr locp) {
DB db = new DB(dbp, false);
DBT dbt1 = new DBT(dbtp1, false);
DBT dbt2 = new DBT(dbtp2, false);
+ if (locp != IntPtr.Zero)
+ locp = IntPtr.Zero;
SecondaryBTreeDatabase tmp =
(SecondaryBTreeDatabase)db.api_internal;
return tmp.compareHandler(
@@ -325,7 +330,7 @@ namespace BerkeleyDB {
}
/// <summary>
- /// If false, empty pages will not be coalesced into higher-level pages.
+ /// If false, empty pages are not coalesced into higher-level pages.
/// </summary>
public bool ReverseSplit {
get {
diff --git a/lang/csharp/src/SecondaryBTreeDatabaseConfig.cs b/lang/csharp/src/SecondaryBTreeDatabaseConfig.cs
index 563c9e66..b19962c7 100644
--- a/lang/csharp/src/SecondaryBTreeDatabaseConfig.cs
+++ b/lang/csharp/src/SecondaryBTreeDatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -15,9 +15,8 @@ namespace BerkeleyDB {
/// </summary>
public class SecondaryBTreeDatabaseConfig : SecondaryDatabaseConfig {
/// <summary>
- /// Policy for duplicate data items in the database; that is, insertion
- /// when the key of the key/data pair being inserted already exists in
- /// the database will be successful.
+ /// Policy for duplicate data items in the database. Allows a key/data
+ /// pair to be inserted into the database even if the key already exists.
/// </summary>
/// <remarks>
/// <para>The ordering of duplicates in the database for
@@ -29,7 +28,7 @@ namespace BerkeleyDB {
/// duplicate comparison function. If the application does not specify a
/// comparison function using
/// <see cref="DuplicateCompare"/>, a default lexical
- /// comparison will be used.
+ /// comparison is used.
/// </para>
/// <para>
/// <see cref="DuplicatesPolicy.SORTED"/> is preferred to
@@ -39,7 +38,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If the database already exists, the value of Duplicates must be the
- /// same as the existing database or an error will be returned.
+ /// same as the existing database or an error is returned.
/// </para>
/// <para>
/// It is an error to specify <see cref="UseRecordNumbers"/> and
@@ -55,7 +54,7 @@ namespace BerkeleyDB {
/// implementation attempts to coalesce empty pages into higher-level
/// pages in order to keep the database as small as possible and
/// minimize search time. This can hurt performance in applications with
- /// cyclical data demands; that is, applications where the database
+ /// cyclical data demands; applications where the database
/// grows and shrinks repeatedly. For example, because Berkeley DB does
/// page-level locking, the maximum level of concurrency in a database
/// of two pages is far smaller than that in a database of 100 pages, so
@@ -86,7 +85,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If the database already exists, the value of UseRecordNumbers must
- /// be the same as the existing database or an error will be returned.
+ /// be the same as the existing database or an error is returned.
/// </para>
/// </remarks>
public bool UseRecordNumbers;
@@ -107,7 +106,7 @@ namespace BerkeleyDB {
/// <remarks>
/// If the database does not already exist and
/// <see cref="CreatePolicy.NEVER"/> is set,
- /// <see cref="SecondaryBTreeDatabase.Open"/> will fail.
+ /// <see cref="SecondaryBTreeDatabase.Open"/> fails.
/// </remarks>
public CreatePolicy Creation;
internal new uint openFlags {
@@ -198,14 +197,14 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// This value is used to determine if key or data items will be stored
+ /// This value is used to determine if key or data items are stored
/// on overflow pages instead of Btree leaf pages. For more information
/// on the specific algorithm used, see the Berkeley DB Reference Guide.
/// The value specified must be at least 2; if not explicitly set, a
/// value of 2 is used.
/// </para>
/// <para>
- /// If the database already exists, MinKeysPerPage will be ignored.
+ /// If the database already exists, MinKeysPerPage is ignored.
/// </para>
/// </remarks>
public uint MinKeysPerPage {
diff --git a/lang/csharp/src/SecondaryCursor.cs b/lang/csharp/src/SecondaryCursor.cs
index 5d8b63dd..6910890f 100644
--- a/lang/csharp/src/SecondaryCursor.cs
+++ b/lang/csharp/src/SecondaryCursor.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -91,9 +91,9 @@ namespace BerkeleyDB {
/// <param name="keepPosition">
/// If true, the newly created cursor is initialized to refer to the
/// same position in the database as the original cursor (if any) and
- /// hold the same locks (if any). If false, or the original cursor does
+ /// hold the same locks (if any). If false, or if the original cursor does
/// not hold a database position and locks, the created cursor is
- /// uninitialized and will behave like a cursor newly created by
+ /// uninitialized and behaves like a cursor newly created by
/// <see cref="BaseDatabase.Cursor"/>.</param>
/// <returns>A newly created cursor</returns>
public SecondaryCursor Duplicate(bool keepPosition) {
@@ -110,7 +110,7 @@ namespace BerkeleyDB {
/// <see cref="SecondaryCursor"/>.
/// </summary>
/// <remarks>
- /// The enumerator will begin at the cursor's current position (or the
+ /// The enumerator begins at the cursor's current position (or the
/// first record if the cursor has not yet been positioned) and iterate
/// forwards (i.e. in the direction of <see cref="MoveNext"/>) over the
/// remaining records.
@@ -642,8 +642,8 @@ namespace BerkeleyDB {
/// If the next key/data pair of the database is a duplicate data record
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store the secondary key and primary
- /// key/data pair in <see cref="Current"/>. MoveNextDuplicate will
- /// return false if the next key/data pair of the database is not a
+ /// key/data pair in <see cref="Current"/>. MoveNextDuplicate
+ /// returns false if the next key/data pair of the database is not a
/// duplicate data record for the current key/data pair.
/// </summary>
/// <remarks>
@@ -658,8 +658,8 @@ namespace BerkeleyDB {
/// If the next key/data pair of the database is a duplicate data record
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store the secondary key and primary
- /// key/data pair in <see cref="Current"/>. MoveNextDuplicate will
- /// return false if the next key/data pair of the database is not a
+ /// key/data pair in <see cref="Current"/>. MoveNextDuplicate
+ /// returns false if the next key/data pair of the database is not a
/// duplicate data record for the current key/data pair.
/// </summary>
/// <remarks>
@@ -681,8 +681,8 @@ namespace BerkeleyDB {
/// If the next key/data pair of the database is a duplicate data record
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store the secondary key and primary
- /// key/data pair in <see cref="Current"/>. MoveNextDuplicate will
- /// return false if the next key/data pair of the database is not a
+ /// key/data pair in <see cref="Current"/>. MoveNextDuplicate
+ /// returns false if the next key/data pair of the database is not a
/// duplicate data record for the current key/data pair. If
/// <paramref name="key"/>, or <paramref name="pkey"/>, or
/// <paramref name="data"/> is partial <see cref="DatabaseEntry"/>,
@@ -715,8 +715,8 @@ namespace BerkeleyDB {
/// If the next key/data pair of the database is a duplicate data record
/// for the current key/data pair, move the cursor to the next key/data
/// pair in the database, and store the secondary key and primary
- /// key/data pair in <see cref="Current"/>. MoveNextDuplicate will
- /// return false if the next key/data pair of the database is not a
+ /// key/data pair in <see cref="Current"/>. MoveNextDuplicate
+ /// returns false if the next key/data pair of the database is not a
/// duplicate data record for the current key/data pair. If
/// <paramref name="key"/>, or <paramref name="pkey"/>, or
/// <paramref name="data"/> is partial <see cref="DatabaseEntry"/>,
@@ -751,8 +751,8 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MoveNextUnique is identical to
/// <see cref="MoveFirst()"/>. Otherwise, move the cursor to the next
/// non-duplicate key in the database, and store the secondary key and
- /// primary key/data pair in <see cref="Current"/>. MoveNextUnique will
- /// return false if no non-duplicate key/data pairs exist after the
+ /// primary key/data pair in <see cref="Current"/>. MoveNextUnique
+ /// returns false if no non-duplicate key/data pairs exist after the
/// cursor position in the database.
/// </summary>
/// <remarks>
@@ -767,14 +767,14 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MoveNextUnique is identical to
/// <see cref="MoveFirst()"/>. Otherwise, move the cursor to the next
/// non-duplicate key in the database, and store the secondary key and
- /// primary key/data pair in <see cref="Current"/>. MoveNextUnique will
- /// return false if no non-duplicate key/data pairs exist after the
+ /// primary key/data pair in <see cref="Current"/>. MoveNextUnique
+ /// returns false if no non-duplicate key/data pairs exist after the
/// cursor position in the database.
/// </summary>
/// <remarks>
/// <para>
- /// If the database is a Queue or Recno database, MoveNextUnique will
- /// ignore any keys that exist but were never explicitly created by the
+ /// If the database is a Queue or Recno database, MoveNextUnique
+ /// ignores any keys that exist but were never explicitly created by the
/// application, or those that were created and later deleted.
/// </para>
/// <para>
@@ -797,8 +797,8 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MoveNextUnique is identical to
/// <see cref="MoveFirst()"/>. Otherwise, move the cursor to the next
/// non-duplicate key in the database, and store the secondary key and
- /// primary key/data pair in <see cref="Current"/>. MoveNextUnique will
- /// return false if no non-duplicate key/data pairs exist after the
+ /// primary key/data pair in <see cref="Current"/>. MoveNextUnique
+ /// returns false if no non-duplicate key/data pairs exist after the
/// cursor position in the database. If <paramref name="key"/>, or
/// <paramref name="pkey"/>, or <paramref name="data"/> is
/// partial <see cref="DatabaseEntry"/>, its
@@ -832,7 +832,7 @@ namespace BerkeleyDB {
/// <see cref="MoveFirst(LockingInfo)"/>. Otherwise, move the cursor to
/// the next non-duplicate key in the database, and store the secondary
/// key and primary key/data pair in <see cref="Current"/>.
- /// MoveNextUnique will return false if no non-duplicate key/data pairs
+ /// MoveNextUnique returns false if no non-duplicate key/data pairs
/// exist after the cursor position in the database. If
/// <paramref name="key"/>, or <paramref name="pkey"/>, or
/// <paramref name="data"/> is partial <see cref="DatabaseEntry"/>, its
@@ -977,7 +977,7 @@ namespace BerkeleyDB {
/// record for the current key/data pair, the cursor is moved to the
/// previous key/data pair of the database, and the secondary key and
/// primary key/data pair in <see cref="Current"/>. MovePrevDuplicate
- /// will return false if the previous key/data pair of the database is
+ /// returns false if the previous key/data pair of the database is
/// not a duplicate data record for the current key/data pair.
/// </summary>
/// <remarks>
@@ -993,7 +993,7 @@ namespace BerkeleyDB {
/// record for the current key/data pair, the cursor is moved to the
/// previous key/data pair of the database, and the secondary key and
/// primary key/data pair in <see cref="Current"/>. MovePrevDuplicate
- /// will return false if the previous key/data pair of the database is
+ /// returns false if the previous key/data pair of the database is
/// not a duplicate data record for the current key/data pair.
/// </summary>
/// <remarks>
@@ -1016,7 +1016,7 @@ namespace BerkeleyDB {
/// record for the current key/data pair, the cursor is moved to the
/// previous key/data pair of the database, and the secondary key and
/// primary key/data pair in <see cref="Current"/>. MovePrevDuplicate
- /// will return false if the previous key/data pair of the database is
+ /// returns false if the previous key/data pair of the database is
/// not a duplicate data record for the current key/data pair. If
/// <paramref name="key"/>, or <paramref name="pkey"/>, or
/// <paramref name="data"/> is partial <see cref="DatabaseEntry"/>, its
@@ -1050,7 +1050,7 @@ namespace BerkeleyDB {
/// record for the current key/data pair, the cursor is moved to the
/// previous key/data pair of the database, and the secondary key and
/// primary key/data pair in <see cref="Current"/>. MovePrevDuplicate
- /// will return false if the previous key/data pair of the database is
+ /// returns false if the previous key/data pair of the database is
/// not a duplicate data record for the current key/data pair. If
/// <paramref name="key"/>, or <paramref name="pkey"/>, or
/// <paramref name="data"/> is partial <see cref="DatabaseEntry"/>, its
@@ -1085,8 +1085,8 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MovePrevUnique is identical to
/// <see cref="MoveLast()"/>. Otherwise, move the cursor to the previous
/// non-duplicate key in the database, and store the secondary key and
- /// primary key/data pair in <see cref="Current"/>. MovePrevUnique will
- /// return false if no non-duplicate key/data pairs exist after the
+ /// primary key/data pair in <see cref="Current"/>. MovePrevUnique
+ /// returns false if no non-duplicate key/data pairs exist after the
/// cursor position in the database.
/// </summary>
/// <remarks>
@@ -1102,7 +1102,7 @@ namespace BerkeleyDB {
/// <see cref="MoveLast(LockingInfo)"/>. Otherwise, move the cursor to
/// the previous non-duplicate key in the database, and store the
/// secondary key and primary key/data pair in <see cref="Current"/>.
- /// MovePrevUnique will return false if no non-duplicate key/data pairs
+ /// MovePrevUnique returns false if no non-duplicate key/data pairs
/// exist after the cursor position in the database.
/// </summary>
/// <remarks>
@@ -1124,8 +1124,8 @@ namespace BerkeleyDB {
/// If the cursor is not yet initialized, MovePrevUnique is identical to
/// <see cref="MoveLast()"/>. Otherwise, move the cursor to the previous
/// non-duplicate key in the database, and store the secondary key and
- /// primary key/data pair in <see cref="Current"/>. MovePrevUnique will
- /// return false if no non-duplicate key/data pairs exist after the
+ /// primary key/data pair in <see cref="Current"/>. MovePrevUnique
+ /// returns false if no non-duplicate key/data pairs exist after the
/// cursor position in the database. If <paramref name="key"/>, or
/// <paramref name="pkey"/>, or <paramref name="data"/> is
/// partial <see cref="DatabaseEntry"/>, its
@@ -1159,7 +1159,7 @@ namespace BerkeleyDB {
/// <see cref="MoveLast(LockingInfo)"/>. Otherwise, move the cursor to
/// the previous non-duplicate key in the database, and store the
/// secondary key and primary key/data pair in <see cref="Current"/>.
- /// MovePrevUnique will return false if no non-duplicate key/data pairs
+ /// MovePrevUnique returns false if no non-duplicate key/data pairs
/// exist after the cursor position in the database. If
/// <paramref name="key"/>, or <paramref name="pkey"/>, or
/// <paramref name="data"/> is partial <see cref="DatabaseEntry"/>, its
diff --git a/lang/csharp/src/SecondaryDatabase.cs b/lang/csharp/src/SecondaryDatabase.cs
index ff64fff3..ca0a2381 100644
--- a/lang/csharp/src/SecondaryDatabase.cs
+++ b/lang/csharp/src/SecondaryDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -59,13 +59,13 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database.
/// </param>
/// <param name="cfg">The database's configuration</param>
@@ -90,13 +90,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database.
/// </param>
/// <param name="DatabaseName">
@@ -121,13 +121,13 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database.
/// </param>
/// <param name="cfg">The database's configuration</param>
@@ -160,13 +160,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database.
/// </param>
/// <param name="DatabaseName">
@@ -253,7 +253,7 @@ namespace BerkeleyDB {
/*
* We need a managed array to copy each DBT into and then we'll
* copy the managed array to the native array we just allocated.
- * We're not able to copy native -> native.
+ * We are not able to copy native -> native.
*/
byte[] arr = new byte[nrecs * dbt_sz];
IntPtr p;
diff --git a/lang/csharp/src/SecondaryDatabaseConfig.cs b/lang/csharp/src/SecondaryDatabaseConfig.cs
index 1332b951..fc49a414 100644
--- a/lang/csharp/src/SecondaryDatabaseConfig.cs
+++ b/lang/csharp/src/SecondaryDatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -17,12 +17,12 @@ namespace BerkeleyDB {
public class SecondaryDatabaseConfig : DatabaseConfig {
private Database pdp;
/// <summary>
- /// All updates to Primary will be automatically reflected in the
- /// secondary and all reads from the secondary will return corresponding
+ /// All updates to the primary database are automatically reflected in the
+ /// secondary and all reads from the secondary return corresponding
/// data from Primary.
/// </summary>
/// <remarks>
- /// Note that as primary keys must be unique for secondary indices to
+ /// As primary keys must be unique for secondary indices to
/// work, Primary must have been configured with
/// <see cref="DuplicatesPolicy.NONE"/>.
/// </remarks>
@@ -68,8 +68,8 @@ namespace BerkeleyDB {
/// modify a primary database being used to populate a secondary
/// database, in another thread of control, until
/// <see cref="SecondaryDatabase.Open"/> has returned successfully in
- /// the first thread. If transactions are being used, Berkeley DB will
- /// perform appropriate locking and the application need not do any
+ /// the first thread. If transactions are being used, Berkeley DB
+ /// performs appropriate locking and the application need not do any
/// special operation ordering.
/// </para>
/// </remarks>
@@ -80,7 +80,7 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// This setting can be used to optimize updates when the secondary key
- /// in a primary record will never be changed after the primary record
+ /// in a primary record is never changed after the primary record
/// is inserted. For immutable secondary keys, a best effort is made to
/// avoid calling the secondary callback function when primary records
/// are updated. This optimization may reduce the overhead of update
diff --git a/lang/csharp/src/SecondaryHashDatabase.cs b/lang/csharp/src/SecondaryHashDatabase.cs
index 73f6d45a..3514fc78 100644
--- a/lang/csharp/src/SecondaryHashDatabase.cs
+++ b/lang/csharp/src/SecondaryHashDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -57,13 +57,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -93,13 +93,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -130,15 +130,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -176,15 +176,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -235,10 +235,12 @@ namespace BerkeleyDB {
#region Callbacks
private static int doDupCompare(
- IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p) {
+ IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p, IntPtr locp) {
DB db = new DB(dbp, false);
DBT dbt1 = new DBT(dbt1p, false);
DBT dbt2 = new DBT(dbt2p, false);
+ if (locp != IntPtr.Zero)
+ locp = IntPtr.Zero;
SecondaryHashDatabase tmp = (SecondaryHashDatabase)db.api_internal;
return tmp.DupCompare(
@@ -252,10 +254,13 @@ namespace BerkeleyDB {
SecondaryHashDatabase tmp = (SecondaryHashDatabase)db.api_internal;
return tmp.HashFunction(t_data);
}
- private static int doCompare(IntPtr dbp, IntPtr dbtp1, IntPtr dbtp2) {
+ private static int doCompare(IntPtr dbp,
+ IntPtr dbtp1, IntPtr dbtp2, IntPtr locp) {
DB db = new DB(dbp, false);
DBT dbt1 = new DBT(dbtp1, false);
DBT dbt2 = new DBT(dbtp2, false);
+ if (locp != IntPtr.Zero)
+ locp = IntPtr.Zero;
SecondaryHashDatabase tmp = (SecondaryHashDatabase)db.api_internal;
return tmp.Compare(
diff --git a/lang/csharp/src/SecondaryHashDatabaseConfig.cs b/lang/csharp/src/SecondaryHashDatabaseConfig.cs
index 08509bc5..5f23efcd 100644
--- a/lang/csharp/src/SecondaryHashDatabaseConfig.cs
+++ b/lang/csharp/src/SecondaryHashDatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -16,9 +16,8 @@ namespace BerkeleyDB {
public class SecondaryHashDatabaseConfig : SecondaryDatabaseConfig {
/* Fields for db->set_flags() */
/// <summary>
- /// Policy for duplicate data items in the database; that is, insertion
- /// when the key of the key/data pair being inserted already exists in
- /// the database will be successful.
+ /// Policy for duplicate data items in the database. Allows a key/data
+ /// pair to be inserted into the database even if the key already exists.
/// </summary>
/// <remarks>
/// <para>
@@ -31,7 +30,7 @@ namespace BerkeleyDB {
/// duplicate comparison function. If the application does not specify a
/// comparison function using
/// <see cref="DuplicateCompare"/>, a default lexical
- /// comparison will be used.
+ /// comparison is used.
/// </para>
/// <para>
/// <see cref="DuplicatesPolicy.SORTED"/> is preferred to
@@ -41,7 +40,7 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If the database already exists, the value of Duplicates must be the
- /// same as the existing database or an error will be returned.
+ /// same as the existing database or an error is returned.
/// </para>
/// </remarks>
public DuplicatesPolicy Duplicates;
@@ -59,7 +58,7 @@ namespace BerkeleyDB {
/// <remarks>
/// If the database does not already exist and
/// <see cref="CreatePolicy.NEVER"/> is set,
- /// <see cref="SecondaryHashDatabase.Open"/> will fail.
+ /// <see cref="SecondaryHashDatabase.Open"/> fails.
/// </remarks>
public CreatePolicy Creation;
internal new uint openFlags {
@@ -95,7 +94,7 @@ namespace BerkeleyDB {
private uint ffactor;
/// <summary>
/// The desired density within the hash table. If no value is specified,
- /// the fill factor will be selected dynamically as pages are filled.
+ /// the fill factor is selected dynamically as pages are filled.
/// </summary>
/// <remarks>
/// <para>
@@ -109,7 +108,7 @@ namespace BerkeleyDB {
/// (pagesize - 32) / (average_key_size + average_data_size + 8)
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public uint FillFactor {
@@ -171,12 +170,12 @@ namespace BerkeleyDB {
/// <para>
/// In order for the estimate to be used when creating the database,
/// <see cref="FillFactor"/> must also be set. If the estimate or fill
- /// factor are not set or are set too low, hash tables will still expand
+ /// factor are not set or are set too low, hash tables still expand
/// gracefully as keys are entered, although a slight performance
/// degradation may be noticed.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public uint TableSize {
diff --git a/lang/csharp/src/SecondaryQueueDatabase.cs b/lang/csharp/src/SecondaryQueueDatabase.cs
index b529e120..108a36e4 100644
--- a/lang/csharp/src/SecondaryQueueDatabase.cs
+++ b/lang/csharp/src/SecondaryQueueDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -47,13 +47,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -78,15 +78,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
diff --git a/lang/csharp/src/SecondaryQueueDatabaseConfig.cs b/lang/csharp/src/SecondaryQueueDatabaseConfig.cs
index 7a486ea8..fadd7cd8 100644
--- a/lang/csharp/src/SecondaryQueueDatabaseConfig.cs
+++ b/lang/csharp/src/SecondaryQueueDatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -33,11 +33,11 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// Any attempt to insert records into the database that are greater
- /// than Length bytes long will cause the call to fail immediately and
+ /// than Length bytes long cause the call to fail immediately and
/// return an error.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public uint Length {
@@ -54,7 +54,7 @@ namespace BerkeleyDB {
/// <remarks>
/// If the database does not already exist and
/// <see cref="CreatePolicy.NEVER"/> is set,
- /// <see cref="SecondaryQueueDatabase.Open"/> will fail.
+ /// <see cref="SecondaryQueueDatabase.Open"/> fails.
/// </remarks>
public CreatePolicy Creation;
internal new uint openFlags {
@@ -73,11 +73,11 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// If no pad character is specified, space characters (that is, ASCII
+ /// If no pad character is specified, space characters (ASCII
/// 0x20) are used for padding.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public int PadByte {
@@ -106,7 +106,7 @@ namespace BerkeleyDB {
/// size in the Programmer's Reference Guide.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public uint ExtentSize {
diff --git a/lang/csharp/src/SecondaryRecnoDatabase.cs b/lang/csharp/src/SecondaryRecnoDatabase.cs
index 4c8a5445..54546e2a 100644
--- a/lang/csharp/src/SecondaryRecnoDatabase.cs
+++ b/lang/csharp/src/SecondaryRecnoDatabase.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -50,13 +50,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -86,13 +86,13 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
- /// will be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
/// be transactionally protected during its open.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -123,15 +123,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -169,15 +169,15 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If <paramref name="txn"/> is null, but
- /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation will
- /// be implicitly transaction protected. Note that transactionally
- /// protected operations on a datbase object requires the object itself
- /// be transactionally protected during its open. Also note that the
+ /// <see cref="DatabaseConfig.AutoCommit"/> is set, the operation
+ /// is implicitly transaction protected. Transactionally
+ /// protected operations on a database object requires the object itself
+ /// be transactionally protected during its open. The
/// transaction must be committed before the object is closed.
/// </para>
/// </remarks>
/// <param name="Filename">
- /// The name of an underlying file that will be used to back the
+ /// The name of an underlying file used to back the
/// database. In-memory databases never intended to be preserved on disk
/// may be created by setting this parameter to null.
/// </param>
@@ -237,7 +237,7 @@ namespace BerkeleyDB {
}
}
/// <summary>
- /// If true, any <see cref="BackingFile"/> file will be read in its
+ /// If true, any <see cref="BackingFile"/> file is read in its
/// entirety when <see cref="Open"/> is called. If false,
/// <see cref="BackingFile"/> may be read lazily.
/// </summary>
diff --git a/lang/csharp/src/SecondaryRecnoDatabaseConfig.cs b/lang/csharp/src/SecondaryRecnoDatabaseConfig.cs
index 8b8e10d6..63f8201e 100644
--- a/lang/csharp/src/SecondaryRecnoDatabaseConfig.cs
+++ b/lang/csharp/src/SecondaryRecnoDatabaseConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -23,29 +23,29 @@ namespace BerkeleyDB {
/// <para>
/// For example, the deletion of record number 4 causes records numbered
/// 5 and greater to be renumbered downward by one. If a cursor was
- /// positioned to record number 4 before the deletion, it will refer to
+ /// positioned as record number 4 before the deletion, it refers to
/// the new record number 4, if any such record exists, after the
/// deletion. If a cursor was positioned after record number 4 before
- /// the deletion, it will be shifted downward one logical record,
+ /// the deletion, it is shifted downward one logical record,
/// continuing to refer to the same record as it did before.
/// </para>
/// <para>
/// Using <see cref="Database.Put"/> or <see cref="Cursor.Put"/> to
- /// create new records will cause the creation of multiple records if
+ /// create new records causes the creation of multiple records if
/// the record number is more than one greater than the largest record
- /// currently in the database. For example, creating record 28, when
- /// record 25 was previously the last record in the database, will
- /// create records 26 and 27 as well as 28. Attempts to retrieve records
- /// that were created in this manner will throw a
+ /// currently in the database. For example, creating record 28 when
+ /// record 25 was previously the last record in the database
+ /// creates records 26 and 27 as well as 28. Attempts to retrieve records
+ /// that were created in this manner throw a
/// <see cref="KeyEmptyException"/>.
/// </para>
/// <para>
/// If a created record is not at the end of the database, all records
- /// following the new record will be automatically renumbered upward by
+ /// following the new record are automatically renumbered upward by
/// one. For example, the creation of a new record numbered 8 causes
/// records numbered 8 and greater to be renumbered upward by one. If a
/// cursor was positioned to record number 8 or greater before the
- /// insertion, it will be shifted upward one logical record, continuing
+ /// insertion, it is shifted upward one logical record, continuing
/// to refer to the same record as it did before.
/// </para>
/// <para>
@@ -55,12 +55,12 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// If the database already exists, this setting must be the same as the
- /// existing database or an exception will be thrown.
+ /// existing database or an exception is thrown.
/// </para>
/// </remarks>
public bool Renumber;
/// <summary>
- /// If true, any <see cref="BackingFile"/> file will be read in its
+ /// If true, any <see cref="BackingFile"/> file is read in its
/// entirety when <see cref="SecondaryRecnoDatabase.Open"/> is called.
/// If false, <see cref="BackingFile"/> may be read lazily.
/// </summary>
@@ -80,7 +80,7 @@ namespace BerkeleyDB {
/// <remarks>
/// If the database does not already exist and
/// <see cref="CreatePolicy.NEVER"/> is set,
- /// <see cref="SecondaryRecnoDatabase.Open"/> will fail.
+ /// <see cref="SecondaryRecnoDatabase.Open"/> fails.
/// </remarks>
public CreatePolicy Creation;
internal new uint openFlags {
@@ -103,10 +103,10 @@ namespace BerkeleyDB {
/// This byte is used for variable length records if
/// <see cref="BackingFile"/> is set. If <see cref="BackingFile"/> is
/// specified and no delimiting byte was specified, newline characters
- /// (that is, ASCII 0x0a) are interpreted as end-of-record markers.
+ /// (ASCII 0x0a) are interpreted as end-of-record markers.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public int Delimiter {
@@ -131,11 +131,11 @@ namespace BerkeleyDB {
/// </para>
/// <para>
/// Any attempt to insert records into the database that are greater
- /// than Length bytes long will cause the call to fail immediately and
+ /// than Length bytes long cause the call to fail immediately and
/// return an error.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public uint Length {
@@ -153,11 +153,11 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// If no pad character is specified, space characters (that is, ASCII
+ /// If no pad character is specified, space characters (ASCII
/// 0x20) are used for padding.
/// </para>
/// <para>
- /// If the database already exists, this setting will be ignored.
+ /// If the database already exists, this setting is ignored.
/// </para>
/// </remarks>
public int PadByte {
@@ -190,10 +190,10 @@ namespace BerkeleyDB {
/// underlying database file (for example,
/// <see cref="BaseDatabase.Close"/> or
/// <see cref="BaseDatabase.Sync"/>), the in-memory copy of the
- /// database will be written back to the source file.
+ /// database is written back to the source file.
/// </para>
/// <para>
- /// By default, the backing source file is read lazily; that is, records
+ /// By default, the backing source file is read lazily; records
/// are not read from the file until they are requested by the
/// application. If multiple processes (not threads) are accessing a
/// Recno database concurrently, and are either inserting or deleting
@@ -212,7 +212,7 @@ namespace BerkeleyDB {
/// the system crashes at the right instant. If a file is used to hold
/// the database, normal database recovery on that file can be used to
/// prevent information loss, although it is still possible that the
- /// contents of source will be lost if the system crashes.
+ /// contents of source become lost if the system crashes.
/// </para>
/// <para>
/// The source file must already exist (but may be zero-length) when
@@ -223,10 +223,10 @@ namespace BerkeleyDB {
/// a database, nor is it an error to modify the resulting database.
/// However, any attempt to write the changes to the backing source file
/// using either the <see cref="BaseDatabase.Sync"/> or
- /// <see cref="BaseDatabase.Close"/> methods will fail, of course.
+ /// <see cref="BaseDatabase.Close"/> methods fail, of course.
/// Use <see cref="BaseDatabase.Close(bool)"/> to stop it from
/// attempting to write the changes to the backing file; instead, they
- /// will be silently discarded.
+ /// are silently discarded.
/// </para>
/// <para>
/// For all of the previous reasons, the source file is generally used
diff --git a/lang/csharp/src/Sequence.cs b/lang/csharp/src/Sequence.cs
index 2cd73df0..c4370be7 100644
--- a/lang/csharp/src/Sequence.cs
+++ b/lang/csharp/src/Sequence.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -73,7 +73,7 @@ namespace BerkeleyDB {
/// database and incremented (decremented) by enough to cover the delta
/// and the next batch of cached values.
/// </para>
- /// <para>
+ /// <para>
/// By default, sequence ranges do not wrap; to cause the sequence to
/// wrap around the beginning or end of its range, set
/// <see cref="SequenceConfig.Wrap"/> to true.
@@ -84,7 +84,7 @@ namespace BerkeleyDB {
/// greater than 0.
/// </param>
/// <returns>The next available element in the sequence.</returns>
- public Int64 Get(int Delta) {
+ public Int64 Get(uint Delta) {
return Get(Delta, false, null);
}
/// <summary>
@@ -100,7 +100,7 @@ namespace BerkeleyDB {
/// do not synchronously flush the log when the transaction commits.
/// </param>
/// <returns>The next available element in the sequence.</returns>
- public Int64 Get(int Delta, bool NoSync) {
+ public Int64 Get(uint Delta, bool NoSync) {
return Get(Delta, NoSync, null);
}
/// <summary>
@@ -121,10 +121,10 @@ namespace BerkeleyDB {
/// Must be null if the sequence was opened with a non-zero cache size.
/// </param>
/// <returns>The next available element in the sequence.</returns>
- public Int64 Get(int Delta, Transaction txn) {
+ public Int64 Get(uint Delta, Transaction txn) {
return Get(Delta, false, txn);
}
- private Int64 Get(int Delta, bool NoSync, Transaction txn) {
+ private Int64 Get(uint Delta, bool NoSync, Transaction txn) {
Int64 ret = DbConstants.DB_AUTO_COMMIT;
uint flags = NoSync ? DbConstants.DB_TXN_NOSYNC : 0;
seq.get(Transaction.getDB_TXN(txn), Delta, ref ret, flags);
@@ -223,7 +223,7 @@ namespace BerkeleyDB {
/// sequence, the information returned by DB_SEQUENCE->stat() may be
/// out-of-date.
/// </para>
- /// <para>
+ /// <para>
/// The DB_SEQUENCE->stat() method cannot be transaction-protected. For
/// this reason, it should be called in a thread of control that has no
/// open cursors or active transactions.
@@ -240,7 +240,7 @@ namespace BerkeleyDB {
/// <summary>
/// Release the resources held by this object, and close the sequence if
- /// it's still open.
+ /// it is still open.
/// </summary>
public void Dispose() {
if (isOpen)
@@ -252,9 +252,9 @@ namespace BerkeleyDB {
/// <summary>
/// The current cache size.
/// </summary>
- public int Cachesize {
+ public uint Cachesize {
get {
- int ret = 0;
+ uint ret = 0;
seq.get_cachesize(ref ret);
return ret;
}
@@ -297,7 +297,7 @@ namespace BerkeleyDB {
}
/// <summary>
- /// If true, the sequence will be incremented. This is the default.
+ /// If true, the sequence is incremented. This is the default.
/// </summary>
public bool Increment {
get {
@@ -308,7 +308,7 @@ namespace BerkeleyDB {
}
/// <summary>
- /// If true, the sequence will be decremented.
+ /// If true, the sequence is decremented.
/// </summary>
public bool Decrement {
get {
diff --git a/lang/csharp/src/SequenceConfig.cs b/lang/csharp/src/SequenceConfig.cs
index c50db508..eaedf3fa 100644
--- a/lang/csharp/src/SequenceConfig.cs
+++ b/lang/csharp/src/SequenceConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -20,13 +20,13 @@ namespace BerkeleyDB {
/// <remarks>
/// If the sequence does not already exist and
/// <see cref="CreatePolicy.NEVER"/> is set, the Sequence constructor
- /// will fail.
+ /// fails.
/// </remarks>
public CreatePolicy Creation;
/// <summary>
- /// If true, the object returned by the Sequence constructor will be
- /// free-threaded; that is, usable by multiple threads within a single
- /// address space. Note that if multiple threads create multiple
+ /// If true, the object returned by the Sequence constructor is
+ /// free-threaded; usable by multiple threads within a single
+ /// address space. If multiple threads create multiple
/// sequences using the same <see cref="BackingDatabase"/>, that
/// database must have also been opened free-threaded.
/// </summary>
@@ -52,7 +52,7 @@ namespace BerkeleyDB {
/// <para>
/// If <see cref="BackingDatabase"/> was opened in a transaction,
/// calling Get may result in changes to the sequence object; these
- /// changes will be automatically committed in a transaction internal to
+ /// changes are automatically committed in a transaction internal to
/// the Berkeley DB library. If the thread of control calling Get has an
/// active transaction, which holds locks on the same database as the
/// one in which the sequence object is stored, it is possible for a
@@ -91,14 +91,14 @@ namespace BerkeleyDB {
public bool Wrap;
private bool inc = true;
/// <summary>
- /// If true, the sequence will be decremented.
+ /// If true, the sequence is decremented.
/// </summary>
public bool Decrement {
get { return !inc; }
set { inc = !value; }
}
/// <summary>
- /// If true, the sequence will be incremented. This is the default.
+ /// If true, the sequence is incremented. This is the default.
/// </summary>
public bool Increment {
get { return inc; }
@@ -113,12 +113,12 @@ namespace BerkeleyDB {
}
}
- private int cacheSz;
+ private uint cacheSz;
internal bool cacheSzIsSet;
/// <summary>
/// The number of elements cached by a sequence handle.
/// </summary>
- public int CacheSize {
+ public uint CacheSize {
get { return cacheSz; }
set {
cacheSz = value;
diff --git a/lang/csharp/src/SequenceStats.cs b/lang/csharp/src/SequenceStats.cs
index 3d513c41..163cacc2 100644
--- a/lang/csharp/src/SequenceStats.cs
+++ b/lang/csharp/src/SequenceStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -21,7 +21,7 @@ namespace BerkeleyDB {
/// <summary>
/// Cache size.
/// </summary>
- public int CacheSize { get { return st.st_cache_size; } }
+ public uint CacheSize { get { return st.st_cache_size; } }
/// <summary>
/// Current cached value.
/// </summary>
@@ -55,4 +55,4 @@ namespace BerkeleyDB {
/// </summary>
public long StoredValue { get { return st.st_current; } }
}
-} \ No newline at end of file
+}
diff --git a/lang/csharp/src/Transaction.cs b/lang/csharp/src/Transaction.cs
index 6e6fa672..c2430253 100644
--- a/lang/csharp/src/Transaction.cs
+++ b/lang/csharp/src/Transaction.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -17,18 +17,18 @@ namespace BerkeleyDB {
/// <para>
/// Calling <see cref="Transaction.Abort"/>,
/// <see cref="Transaction.Commit"/> or
- /// <see cref="Transaction.Discard"/> will release the resources held by
+ /// <see cref="Transaction.Discard"/> releases the resources held by
/// the created object.
/// </para>
/// <para>
- /// Transactions may only span threads if they do so serially; that is,
+ /// Transactions may only span threads if they do so serially;
/// each transaction must be active in only a single thread of control
/// at a time. This restriction holds for parents of nested transactions
/// as well; no two children may be concurrently active in more than one
/// thread of control at any one time.
/// </para>
/// <para>
- /// Cursors may not span transactions; that is, each cursor must be
+ /// Cursors may not span transactions; each cursor must be
/// opened and closed within a single transaction.
/// </para>
/// <para>
@@ -82,10 +82,10 @@ namespace BerkeleyDB {
/// </summary>
public byte[] CommitToken {
/*
- *If iscommitted is true, but dbtoken is null, then it's one
+ *If iscommitted is true, but dbtoken is null, then it is one
* of below cases:
* 1) either this transaction is a nested txn; or
- * 2) this environment didn't enable logging; or
+ * 2) this environment did not enable logging; or
* 3) the user calls this function on a rep client node.\
*/
get {
@@ -99,7 +99,7 @@ namespace BerkeleyDB {
/// <summary>
/// The deadlock priority for this transaction. The deadlock detector
- /// will reject lock requests from lower priority transactions before
+ /// rejects lock requests from lower priority transactions before
/// those from higher priority transactions.
/// </summary>
public uint Priority {
@@ -118,15 +118,15 @@ namespace BerkeleyDB {
/// </summary>
/// <remarks>
/// <para>
- /// Before Abort returns, any locks held by the transaction will have
- /// been released.
+ /// Before Abort returns, any locks held by the transaction are
+ /// released.
/// </para>
/// <para>
/// In the case of nested transactions, aborting a parent transaction
/// causes all children (unresolved or not) of the parent transaction to
/// be aborted.
/// </para>
- /// <para>
+ /// <para>
/// All cursors opened within the transaction must be closed before the
/// transaction is aborted. This method closes all open cursor handles,
/// if any. And if a close operation fails, the rest of
@@ -148,18 +148,18 @@ namespace BerkeleyDB {
/// children of the parent to be committed. In the case of nested
/// transactions, if the transaction is a child transaction, its locks
/// are not released, but are acquired by its parent. Although the
- /// commit of the child transaction will succeed, the actual resolution
+ /// commit of the child transaction succeeds, the actual resolution
/// of the child transaction is postponed until the parent transaction
- /// is committed or aborted; that is, if its parent transaction commits,
- /// it will be committed; and if its parent transaction aborts, it will
- /// be aborted.
+ /// is committed or aborted; if its parent transaction commits,
+ /// it is committed; and if its parent transaction aborts, it
+ /// is aborted.
/// </para>
- /// <para>
+ /// <para>
/// All cursors opened within the transaction must be closed before the
/// transaction is committed. If there are cursor handles
- /// open when this method is called, they are all closed inside this
- /// method. And if there are errors when closing the cursor handles,
- /// the transaction is aborted and the first such error is returned.
+ /// open when this method is called, they are all closed inside this
+ /// method. And if there are errors when closing the cursor handles,
+ /// the transaction is aborted and the first such error is returned.
/// </para>
/// </overloads>
public void Commit() {
@@ -194,9 +194,9 @@ namespace BerkeleyDB {
/// transaction.
/// </summary>
/// <remarks>
- /// If there are cursor handles open when this method is called, they
- /// are all closed inside this method. And if there are errors when
- /// closing the cursor handles, the first such error is returned.
+ /// If there are cursor handles open when this method is called, they
+ /// are all closed inside this method. And if there are errors when
+ /// closing the cursor handles, the first such error is returned.
/// This call may be used only after calls to
/// <see cref="DatabaseEnvironment.Recover"/> when there are multiple
/// global transaction managers recovering transactions in a single
@@ -244,21 +244,21 @@ namespace BerkeleyDB {
/// successful responses from all of its prepare messages should it
/// issue any commit messages.
/// </para>
- /// <para>
+ /// <para>
/// In the case of nested transactions, preparing the parent causes all
/// unresolved children of the parent transaction to be committed. Child
- /// transactions should never be explicitly prepared. Their fate will be
+ /// transactions should never be explicitly prepared. Their fate is
/// resolved along with their parent's during global recovery.
/// </para>
/// <para>
- /// If there are cursor handles open when this method is called, they
- /// are all closed inside this method. And if there are errors when
- /// closing the cursor handles, the first such error is returned.
- /// </para>
+ /// If there are cursor handles open when this method is called, they
+ /// are all closed inside this method. And if there are errors when
+ /// closing the cursor handles, the first such error is returned.
+ /// </para>
/// </remarks>
/// <param name="globalId">
- /// The global transaction ID by which this transaction will be known.
- /// This global transaction ID will be returned in calls to
+ /// The global transaction ID by which this transaction is known.
+ /// This global transaction ID is returned in calls to
/// <see cref="DatabaseEnvironment.Recover"/> telling the
/// application which global transactions must be resolved.
/// </param>
@@ -281,7 +281,7 @@ namespace BerkeleyDB {
/// accuracy of the timeout depends on how often deadlock detection is
/// performed.
/// </para>
- /// <para>
+ /// <para>
/// Timeout values may be specified for the database environment as a
/// whole. See <see cref="DatabaseEnvironment.LockTimeout"/> for more
/// information.
@@ -308,7 +308,7 @@ namespace BerkeleyDB {
/// accuracy of the timeout depends on how often deadlock detection is
/// performed.
/// </para>
- /// <para>
+ /// <para>
/// Timeout values may be specified for the database environment as a
/// whole. See <see cref="DatabaseEnvironment.TxnTimeout"/> for more
/// information.
diff --git a/lang/csharp/src/TransactionConfig.cs b/lang/csharp/src/TransactionConfig.cs
index 03f25679..ca5b974f 100644
--- a/lang/csharp/src/TransactionConfig.cs
+++ b/lang/csharp/src/TransactionConfig.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -24,27 +24,27 @@ namespace BerkeleyDB {
/// </summary>
DEFAULT,
/// <summary>
- /// Berkeley DB will not write or synchronously flush the log on
+ /// Berkeley DB does not write or synchronously flush the log on
/// transaction commit or prepare.
/// </summary>
/// <remarks>
/// <para>
- /// This means the transaction will exhibit the ACI (atomicity,
+ /// This means the transaction exhibits the ACI (atomicity,
/// consistency, and isolation) properties, but not D (durability);
- /// that is, database integrity will be maintained but it is
+ /// database integrity is maintained but it is
/// possible that this transaction may be undone during recovery.
/// </para>
/// </remarks>
NOSYNC,
/// <summary>
- /// Berkeley DB will write, but will not synchronously flush, the
+ /// Berkeley DB writes, but does not synchronously flush, the
/// log on transaction commit or prepare.
/// </summary>
/// <remarks>
/// <para>
/// This means that transactions exhibit the ACI (atomicity,
/// consistency, and isolation) properties, but not D (durability);
- /// that is, database integrity will be maintained, but if the
+ /// database integrity is maintained, but if the
/// system fails, it is possible some number of the most recently
/// committed transactions may be undone during recovery. The number
/// of transactions at risk is governed by how often the system
@@ -61,11 +61,11 @@ namespace BerkeleyDB {
/// </remarks>
WRITE_NOSYNC,
/// <summary>
- /// Berkeley DB will synchronously flush the log on transaction
+ /// Berkeley DB synchronously flushes the log on transaction
/// commit or prepare.
/// </summary>
/// <remarks>
- /// This means the transaction will exhibit all of the ACID
+ /// This means the transaction exhibits all of the ACID
/// (atomicity, consistency, isolation, and durability) properties.
/// </remarks>
SYNC
@@ -81,7 +81,7 @@ namespace BerkeleyDB {
/// <remarks>
/// <para>
/// When this attribute is set, the
- /// transaction will avoid logging the contents of insertions on newly
+ /// transaction avoids logging the contents of insertions on newly
/// allocated database pages. In a transaction that inserts a large
/// number of new records, the I/O savings of choosing this option can
/// be significant. Users of this option should be aware of several
@@ -96,10 +96,9 @@ namespace BerkeleyDB {
/// is incompatible with replication, and is simply ignored when
/// replication is enabled. Also, hot backup procedures must follow a
/// particular protocol, introduced in 11gr2.5.1, to set a flag in the
- /// environment before starting to copy files. It is especially
- /// important to note that incremental hot backups can be invalidated
- /// by use of the bulk insert optimization. Please see the hot backup
- /// description in the Getting Started with Transactions Guide,
+ /// environment before starting to copy files. Incremental hot backups
+ /// can be invalidated by use of the bulk insert optimization. Please see
+ /// the hot backup description in the Getting Started with Transactions Guide,
/// and the description of the HotbackupInProgress attribute in
/// <see cref="DatabaseEnvironmentConfig.HotbackupInProgress"/>
/// for further information.
@@ -125,18 +124,18 @@ namespace BerkeleyDB {
/// </remarks>
public bool NoWait;
/// <summary>
- /// If true, this transaction will execute with snapshot isolation.
+ /// If true, this transaction executes with snapshot isolation.
/// </summary>
/// <remarks>
/// <para>
/// For databases with <see cref="DatabaseConfig.UseMVCC"/> set, data
- /// values will be read as they are when the transaction begins, without
+ /// values are read as they are when the transaction begins, without
/// taking read locks. Silently ignored for operations on databases with
/// <see cref="DatabaseConfig.UseMVCC"/> not set on the underlying
/// database (read locks are acquired).
/// </para>
/// <para>
- /// A <see cref="DeadlockException"/> will be thrown from update
+ /// A <see cref="DeadlockException"/> is thrown from update
/// operations if a snapshot transaction attempts to update data which
/// was modified after the snapshot transaction read it.
/// </para>
@@ -190,7 +189,7 @@ namespace BerkeleyDB {
private uint _inittransactioncount;
internal bool initTransactionCountIsSet;
/// <summary>
- /// The initial number of simultaneous transactions that will be
+ /// The initial number of simultaneous transactions that are
/// allocated for in the Berkeley DB environment
/// </summary>
/// <remarks>
diff --git a/lang/csharp/src/TransactionStats.cs b/lang/csharp/src/TransactionStats.cs
index 3273758e..6af1bf9b 100644
--- a/lang/csharp/src/TransactionStats.cs
+++ b/lang/csharp/src/TransactionStats.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
@@ -12,7 +12,7 @@ using BerkeleyDB.Internal;
namespace BerkeleyDB {
/// <summary>
- /// Statistical information about the transaction subsystem
+ /// Statistical information about the transaction subsystem.
/// </summary>
public class TransactionStats {
private TransactionStatStruct st;
@@ -69,7 +69,7 @@ namespace BerkeleyDB {
/// </summary>
public uint MaxSnapshot { get { return st.st_maxnsnapshot; } }
/// <summary>
- /// Maximum txns possible
+ /// Maximum transactions possible
/// </summary>
public uint MaxTransactions { get { return st.st_maxtxns; } }
/// <summary>
diff --git a/lang/csharp/src/VerboseMessages.cs b/lang/csharp/src/VerboseMessages.cs
index f702ce28..bf611e8b 100644
--- a/lang/csharp/src/VerboseMessages.cs
+++ b/lang/csharp/src/VerboseMessages.cs
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
diff --git a/lang/csharp/src/db_dotnet.csproj b/lang/csharp/src/db_dotnet.csproj
index ba0dc416..11549a50 100644
--- a/lang/csharp/src/db_dotnet.csproj
+++ b/lang/csharp/src/db_dotnet.csproj
@@ -5,7 +5,7 @@
<ProjectGuid>{4696FB1E-1E5F-40B9-BD8C-A54D3BDA00F6}</ProjectGuid>
<OutputType>Library</OutputType>
<NoStandardLibraries>false</NoStandardLibraries>
- <AssemblyName>libdb_dotnet53</AssemblyName>
+ <AssemblyName>libdb_dotnet61</AssemblyName>
<RootNamespace>BerkeleyDB</RootNamespace>
<FileUpgradeFlags>
</FileUpgradeFlags>
@@ -38,7 +38,7 @@
<OutputPath>..\..\..\build_windows\AnyCPU\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <DocumentationFile>doc\libdb_dotnet53.XML</DocumentationFile>
+ <DocumentationFile>doc\libdb_dotnet61.XML</DocumentationFile>
<NoWarn>419</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -46,7 +46,7 @@
<Optimize>true</Optimize>
<OutputPath>..\..\..\build_windows\AnyCPU\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
- <DocumentationFile>doc\libdb_dotnet53.XML</DocumentationFile>
+ <DocumentationFile>doc\libdb_dotnet61.XML</DocumentationFile>
<NoWarn>419</NoWarn>
</PropertyGroup>
<ItemGroup>
@@ -71,6 +71,8 @@
<Compile Include="CompactData.cs"/>
<Compile Include="MultipleKeyDatabaseEntry.cs"/>
<Compile Include="DatabaseEntry.cs"/>
+ <Compile Include="DatabaseStream.cs"/>
+ <Compile Include="DatabaseStreamConfig.cs"/>
<Compile Include="DbChannel.cs"/>
<Compile Include="DbSite.cs"/>
<Compile Include="DbSiteConfig.cs"/>
@@ -150,6 +152,7 @@
<Compile Include="Internal\DB_LSN.cs"/>
<Compile Include="Internal\db_recops.cs"/>
<Compile Include="Internal\DB_SITE.cs"/>
+ <Compile Include="Internal\DB_STREAM.cs"/>
<Compile Include="Internal\DB_TXN.cs"/>
<Compile Include="Internal\DB_TXN_TOKEN.cs"/>
<Compile Include="Internal\Delegates.cs"/>