コード例 #1
0
 internal int compact(DB_TXN txn, DatabaseEntry start, DatabaseEntry stop, DB_COMPACT cdata, uint flags, DatabaseEntry end)
 {
     try {
         int ret;
         ret = libdb_csharpPINVOKE.DB_compact(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(start)), DBT.getCPtr(DatabaseEntry.getDBT(stop)), DB_COMPACT.getCPtr(cdata), flags, DBT.getCPtr(DatabaseEntry.getDBT(end)));
         DatabaseException.ThrowException(ret);
         return(ret);
     } finally {
         GC.KeepAlive(start);
         GC.KeepAlive(stop);
         GC.KeepAlive(end);
     }
 }
コード例 #2
0
ファイル: DB.cs プロジェクト: mcandre/db
 internal int compact(DB_TXN txn, DatabaseEntry start, DatabaseEntry stop, DB_COMPACT cdata, uint flags, DatabaseEntry end)
 {
     try {
     int ret;
     ret = libdb_csharpPINVOKE.DB_compact(swigCPtr, DB_TXN.getCPtr(txn), DBT.getCPtr(DatabaseEntry.getDBT(start)), DBT.getCPtr(DatabaseEntry.getDBT(stop)), DB_COMPACT.getCPtr(cdata), flags, DBT.getCPtr(DatabaseEntry.getDBT(end)));
     DatabaseException.ThrowException(ret);
     return ret;
     } finally {
       GC.KeepAlive(start);
       GC.KeepAlive(stop);
       GC.KeepAlive(end);
     }
 }
コード例 #3
0
 /// <summary>
 /// Return pages to the filesystem that are already free and at the end
 /// of the file.
 /// </summary>
 /// <param name="txn">
 /// If the operation is part of an application-specified transaction,
 /// <paramref name="txn"/> is a Transaction object returned from
 /// <see cref="DatabaseEnvironment.BeginTransaction"/>; if
 /// the operation is part of a Berkeley DB Concurrent Data Store group,
 /// <paramref name="txn"/> is a handle returned from
 /// <see cref="DatabaseEnvironment.BeginCDSGroup"/>; otherwise null.
 /// </param>
 /// <returns>
 /// The number of database pages returned to the filesystem
 /// </returns>
 public uint TruncateUnusedPages(Transaction txn)
 {
     DB_COMPACT cdata = new DB_COMPACT();
     db.compact(Transaction.getDB_TXN(txn),
         null, null, cdata, DbConstants.DB_FREELIST_ONLY, null);
     return cdata.compact_pages_truncated;
 }
コード例 #4
0
ファイル: CompactData.cs プロジェクト: rohitlodha/DenverDB
 internal CompactData(DB_COMPACT dbcompact, DatabaseEntry end)
 {
     cdata = dbcompact;
     _end = end;
 }
コード例 #5
0
        private void doCompaction()
        {
            cdata = new DB_COMPACT();

            if (fillPctSet)
                cdata.compact_fillpercent = fillpct;
            if (pgsSet)
                cdata.compact_pages = pgs;
            if (tmoutSet)
                cdata.compact_timeout = tmout;
        }
コード例 #6
0
ファイル: DB_COMPACT.cs プロジェクト: gildafnai82/craq
 internal static HandleRef getCPtr(DB_COMPACT obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
コード例 #7
0
ファイル: DB_COMPACT.cs プロジェクト: bogusfocused/DenverDB
 internal static HandleRef getCPtr(DB_COMPACT obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
コード例 #8
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DB_COMPACT obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }