internal static void Bind() { _beginDelegate = Library.GetProcAddress <BeginDelegate>("mdbx_txn_begin") as BeginDelegate; _commitDelegate = Library.GetProcAddress <CommitDelegate>("mdbx_txn_commit") as CommitDelegate; _abortDelegate = Library.GetProcAddress <AbortDelegate>("mdbx_txn_abort") as AbortDelegate; _resetDelegate = Library.GetProcAddress <ResetDelegate>("mdbx_txn_reset") as ResetDelegate; _renewDelegate = Library.GetProcAddress <RenewDelegate>("mdbx_txn_renew") as RenewDelegate; _getTxnIdDelegate = Library.GetProcAddress <GetTxnIdDelegate>("mdbx_txn_id") as GetTxnIdDelegate; }
/// <summary> /// Ends the storage commit (asynchronous mode). See the example in the class comment /// for an example on how to use this. /// </summary> /// <param name="ar">The ar.</param> public void EndCommit(IAsyncResult ar) { CommitDelegate commitDelegate = ((System.Runtime.Remoting.Messaging.AsyncResult)ar).AsyncDelegate as CommitDelegate; if (commitDelegate != null) { commitDelegate.EndInvoke(ar); } else { throw new InvalidOperationException("cannot end invoke, asynchresult is null"); } }
internal static extern ErrorCode rd_kafka_commit_queue( IntPtr rk, /* const rd_kafka_topic_partition_list_t * */ IntPtr offsets, /* rd_kafka_queue_t * */ IntPtr rkqu, /* offset_commit_cb * */ CommitDelegate cb, /* void * */ IntPtr opaque);
internal static extern void rd_kafka_conf_set_offset_commit_cb( IntPtr conf, CommitDelegate commit_cb);
internal static ErrorCode commit_queue(IntPtr rk, IntPtr offsets, IntPtr rkqu, CommitDelegate cb, IntPtr opaque) => _commit_queue(rk, offsets, rkqu, cb, opaque);
internal static void conf_set_offset_commit_cb(IntPtr conf, CommitDelegate commit_cb) => _conf_set_offset_commit_cb(conf, commit_cb);
/// <summary> /// Begins a storage commitment association with the files in <see cref="StorageInstanceList"/> in /// asynchronous mode. See the example in the class comment /// for an example on how to use this. /// </summary> /// <param name="callback">The callback.</param> /// <param name="asyncState">State of the async.</param> /// <returns></returns> public IAsyncResult BeginCommit(AsyncCallback callback, object asyncState) { CommitDelegate commitDelegate = new CommitDelegate(this.Commit); return(commitDelegate.BeginInvoke(callback, asyncState)); }
/// <summary> /// Begins a storage commitment association with the files in <see cref="StorageInstanceList"/> in /// asynchronous mode. See the example in the class comment /// for an example on how to use this. /// </summary> /// <param name="callback">The callback.</param> /// <param name="asyncState">State of the async.</param> /// <returns></returns> public IAsyncResult BeginCommit(AsyncCallback callback, object asyncState) { CommitDelegate commitDelegate = new CommitDelegate(this.Commit); return commitDelegate.BeginInvoke(callback, asyncState); }