当前位置: 首页>>代码示例>>C#>>正文


C# Internal.DB_ENV类代码示例

本文整理汇总了C#中BerkeleyDB.Internal.DB_ENV的典型用法代码示例。如果您正苦于以下问题:C# DB_ENV类的具体用法?C# DB_ENV怎么用?C# DB_ENV使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DB_ENV类属于BerkeleyDB.Internal命名空间,在下文中一共展示了DB_ENV类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: doRepTransport

 private static int doRepTransport(IntPtr envp,
     IntPtr controlp, IntPtr recp, IntPtr lsnp, int envid, uint flags) {
     DB_ENV dbenv = new DB_ENV(envp, false);
     DBT control = new DBT(controlp, false);
     DBT rec = new DBT(recp, false);
     DB_LSN tmplsn = new DB_LSN(lsnp, false);
     LSN dblsn = new LSN(tmplsn.file, tmplsn.offset);
     return dbenv.api2_internal.transportHandler(
         DatabaseEntry.fromDBT(control),
         DatabaseEntry.fromDBT(rec), dblsn, envid, flags);
 }
开发者ID:gildafnai82,项目名称:craq,代码行数:11,代码来源:DatabaseEnvironment.cs

示例2: doThreadID

        private static void doThreadID(IntPtr env, IntPtr pid, IntPtr tid) {
            DB_ENV dbenv = new DB_ENV(env, false);
            DbThreadID id = dbenv.api2_internal.threadIDHandler();

            /* 
             * Sometimes the library doesn't care about either pid or tid 
             * (usually tid) and will pass NULL instead of a valid pointer.
             */
            if (pid != IntPtr.Zero)
                Marshal.WriteInt32(pid, id.processID);
            if (tid != IntPtr.Zero)
                Marshal.WriteInt32(tid, (int)id.threadID);
        }
开发者ID:gildafnai82,项目名称:craq,代码行数:13,代码来源:DatabaseEnvironment.cs

示例3: doBackupWrite

 private static int doBackupWrite(IntPtr env, uint off_gbytes, uint off_bytes, uint usize, IntPtr buf, IntPtr handle) {
     int ret, size;
     long offset = off_gbytes * GIGABYTE + off_bytes;
     DB_ENV dbenv = new DB_ENV(env, false);
     if (usize > Int32.MaxValue)
         size = Int32.MaxValue;
     else
         size = (int)usize;
     byte[] data = new byte[size];
     Marshal.Copy(buf, data, 0, (int)size);
     ret = dbenv.api2_internal.backupObj.Write(data, offset, (int)size);
     if (ret == 0 && usize > Int32.MaxValue) {
         size = (int)(usize - Int32.MaxValue);
         /* 
          * There's no need to re-allocate data, it's already as large as
          * we could possibly need it to be.  Advance buf beyond what was
          * just copied and write the remaining data.
          */
         buf = new IntPtr(buf.ToInt64() + Int32.MaxValue);
         Marshal.Copy(buf, data, 0, (int)size);
         ret = dbenv.api2_internal.backupObj.Write(data, offset, (int)size);
     }
     return ret;
 }
开发者ID:rohitlodha,项目名称:DenverDB,代码行数:24,代码来源:DatabaseEnvironment.cs

示例4: doThreadName

 private static string doThreadName(IntPtr env,
     int pid, uint tid, ref string buf)
 {
     DB_ENV dbenv = new DB_ENV(env, false);
     DbThreadID id = new DbThreadID(pid, tid);
     string ret =
         dbenv.api2_internal.threadNameHandler(id);
     try {
         buf = ret;
     } catch (NullReferenceException) {
         /*
          * The library may give us a NULL pointer in buf and there's no
          * good way to test for that.  Just ignore the exception if
          * we're not able to set buf.
          */
     }
     return ret;
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:18,代码来源:DatabaseEnvironment.cs

示例5: doRepView

 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);
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:7,代码来源:DatabaseEnvironment.cs

示例6: doNotify

        private static void doNotify(IntPtr env, uint eventcode, byte[] event_info)
        {
            DB_ENV dbenv = new DB_ENV(env, false);

            dbenv.api2_internal.notifyHandler(
                (NotificationEvent)eventcode, event_info);
        }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:7,代码来源:DatabaseEnvironment.cs

示例7: doMsgFeedback

 private static void doMsgFeedback(IntPtr env, string msg)
 {
     DB_ENV dbenv = new DB_ENV(env, false);
     dbenv.api2_internal.msgFeedbackHandler(msg);
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:5,代码来源:DatabaseEnvironment.cs

示例8: doMessageDispatch

 private static void doMessageDispatch(IntPtr env, IntPtr channel,
     IntPtr requestp, uint nrequest, uint cb_flags)
 {
     DB_ENV dbenv = new DB_ENV(env, false);
     DbChannel dbchannel = new DbChannel(new DB_CHANNEL(channel, false));
     bool need_response =
         (cb_flags == DbConstants.DB_REPMGR_NEED_RESPONSE);
     IntPtr[] reqp = new IntPtr[nrequest];
     Marshal.Copy(requestp, reqp, 0, (int)nrequest);
     DatabaseEntry[] requests = new DatabaseEntry[nrequest];
     for (int i = 0; i < nrequest; i++) {
         requests[i] = DatabaseEntry.fromDBT(new DBT(reqp[i], false));
     }
     dbenv.api2_internal.messageDispatchHandler(
         dbchannel, ref requests, out nrequest, need_response);
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:16,代码来源:DatabaseEnvironment.cs

示例9: getCPtr

 internal static HandleRef getCPtr(DB_ENV obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
开发者ID:bohrasd,项目名称:windowsrtdev,代码行数:4,代码来源:DB_ENV.cs

示例10: doErrFeedback

 private static void doErrFeedback(IntPtr env, string pfx, string msg)
 {
     DB_ENV dbenv = new DB_ENV(env, false);
     dbenv.api2_internal.errFeedbackHandler(
         dbenv.api2_internal._pfx, msg);
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:6,代码来源:DatabaseEnvironment.cs

示例11: doBackupOpen

 private static int doBackupOpen(IntPtr env, string dbname, string target, IntPtr handle)
 {
     DB_ENV dbenv = new DB_ENV(env, false);
     return dbenv.api2_internal.backupObj.Open(dbname, target);
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:5,代码来源:DatabaseEnvironment.cs

示例12: doBackupClose

 private static int doBackupClose(IntPtr env, string dbname, IntPtr handle)
 {
     DB_ENV dbenv = new DB_ENV(env, false);
     return dbenv.api2_internal.backupObj.Close(dbname);
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:5,代码来源:DatabaseEnvironment.cs

示例13: __os_umalloc

 internal static IntPtr __os_umalloc(DB_ENV dbenv, uint size)
 {
     return libdb_csharpPINVOKE.__os_umalloc(DB_ENV.getCPtr(dbenv), size);
 }
开发者ID:rohitlodha,项目名称:DenverDB,代码行数:4,代码来源:libdb_csharp.cs

示例14: __os_ufree

 internal static void __os_ufree(DB_ENV dbenv, IntPtr ptr)
 {
     libdb_csharpPINVOKE.__os_ufree(DB_ENV.getCPtr(dbenv), ptr);
 }
开发者ID:rohitlodha,项目名称:DenverDB,代码行数:4,代码来源:libdb_csharp.cs

示例15: alloc_dbt_arr

 internal static uint alloc_dbt_arr(DB_ENV dbenv, int num_dbt, out IntPtr ptr)
 {
     uint ret = libdb_csharpPINVOKE.alloc_dbt_arr(DB_ENV.getCPtr(dbenv), num_dbt, out ptr);
     return ret;
 }
开发者ID:rohitlodha,项目名称:DenverDB,代码行数:5,代码来源:libdb_csharp.cs


注:本文中的BerkeleyDB.Internal.DB_ENV类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。