• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Internal.DB_ENV类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: DatabaseEnvironment

 /* Called by Databases with private environments. */
 internal DatabaseEnvironment(DB_ENV dbenvp)
 {
     dbenv = dbenvp;
     initialize();
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:6,代码来源:DatabaseEnvironment.cs


示例17: doFeedback

 private static void doFeedback(IntPtr env, int opcode, int percent)
 {
     DB_ENV dbenv = new DB_ENV(env, false);
     dbenv.api2_internal.feedbackHandler(
         (EnvironmentFeedbackEvent)opcode, percent);
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:6,代码来源:DatabaseEnvironment.cs


示例18: DB

 internal DB(DB_ENV env, uint flags)
     : this(libdb_csharpPINVOKE.new_DB(DB_ENV.getCPtr(env), flags), true)
 {
 }
开发者ID:mcandre,项目名称:db,代码行数:4,代码来源:DB.cs


示例19: doIsAlive

 private static int doIsAlive(IntPtr env, int pid, uint tid, uint flags)
 {
     DB_ENV dbenv = new DB_ENV(env, false);
     DbThreadID id = new DbThreadID(pid, tid);
     bool procOnly = (flags == DbConstants.DB_MUTEX_PROCESS_ONLY);
     return dbenv.api2_internal.isAliveHandler(id, procOnly) ? 1 : 0;
 }
开发者ID:simonzhangsm,项目名称:h-store,代码行数:7,代码来源:DatabaseEnvironment.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Internal.DB_TXN类代码示例发布时间:2022-05-24
下一篇:
C# Internal.DBT类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap