Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BC37A10C4F for ; Tue, 8 Dec 2015 13:35:14 +0000 (UTC) Received: (qmail 65644 invoked by uid 500); 8 Dec 2015 13:35:14 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 65558 invoked by uid 500); 8 Dec 2015 13:35:14 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 65496 invoked by uid 99); 8 Dec 2015 13:35:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2015 13:35:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6C52BE0593; Tue, 8 Dec 2015 13:35:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.apache.org Date: Tue, 08 Dec 2015 13:35:16 -0000 Message-Id: <2142c42576ff4b748da98d9a01cafcf7@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/4] ignite git commit: IGNITE-1694 : .NET: Use DllImport instead of delegates in P/Invoke. IGNITE-1694 : .NET: Use DllImport instead of delegates in P/Invoke. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/568f910f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/568f910f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/568f910f Branch: refs/heads/ignite-1.5 Commit: 568f910f11472e6ab533c3f1cef6f197456e006f Parents: efe632b Author: Pavel Tupitsyn Authored: Tue Dec 8 16:35:51 2015 +0300 Committer: vozerov-gridgain Committed: Tue Dec 8 16:35:51 2015 +0300 ---------------------------------------------------------------------- .../Apache.Ignite.Core.csproj | 1 + .../Apache.Ignite.Core/Impl/NativeMethods.cs | 10 - .../Impl/Unmanaged/IgniteJniNativeMethods.cs | 358 +++++++++ .../Impl/Unmanaged/UnmanagedUtils.cs | 788 +++---------------- modules/platforms/dotnet/Apache.Ignite.FxCop | 322 +++++++- 5 files changed, 798 insertions(+), 681 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/568f910f/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj index 2c7d787..831130c 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj @@ -297,6 +297,7 @@ + http://git-wip-us.apache.org/repos/asf/ignite/blob/568f910f/modules/platforms/dotnet/Apache.Ignite.Core/Impl/NativeMethods.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/NativeMethods.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/NativeMethods.cs index 6e25e7e..eb3ba97 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/NativeMethods.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/NativeMethods.cs @@ -33,15 +33,5 @@ namespace Apache.Ignite.Core.Impl [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)] internal static extern IntPtr LoadLibrary(string path); - - /// - /// Get procedure address with WinAPI. - /// - /// DLL pointer. - /// Procedure name. - /// Procedure address. - [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Ansi, BestFitMapping = false, - ThrowOnUnmappableChar = true)] - internal static extern IntPtr GetProcAddress(IntPtr ptr, string name); } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/568f910f/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs new file mode 100644 index 0000000..860e703 --- /dev/null +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/IgniteJniNativeMethods.cs @@ -0,0 +1,358 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Apache.Ignite.Core.Impl.Unmanaged +{ + using System.Runtime.InteropServices; + using System.Security; + + /// + /// Ignite JNI native methods. + /// + [SuppressUnmanagedCodeSecurity] + internal unsafe static class IgniteJniNativeMethods + { + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteReallocate")] + public static extern int Reallocate(long memPtr, int cap); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteIgnitionStart")] + public static extern void* IgnitionStart(void* ctx, sbyte* cfgPath, sbyte* gridName, int factoryId, + long dataPtr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteIgnitionStop")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool IgnitionStop(void* ctx, sbyte* gridName, [MarshalAs(UnmanagedType.U1)] bool cancel); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteIgnitionStopAll")] + public static extern void IgnitionStopAll(void* ctx, [MarshalAs(UnmanagedType.U1)] bool cancel); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorReleaseStart")] + public static extern void ProcessorReleaseStart(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorProjection")] + public static extern void* ProcessorProjection(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorCache")] + public static extern void* ProcessorCache(void* ctx, void* obj, sbyte* name); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorCreateCache")] + public static extern void* ProcessorCreateCache(void* ctx, void* obj, sbyte* name); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorGetOrCreateCache")] + public static extern void* ProcessorGetOrCreateCache(void* ctx, void* obj, sbyte* name); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorAffinity")] + public static extern void* ProcessorAffinity(void* ctx, void* obj, sbyte* name); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorDataStreamer")] + public static extern void* ProcessorDataStreamer(void* ctx, void* obj, sbyte* name, + [MarshalAs(UnmanagedType.U1)] bool keepBinary); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorTransactions")] + public static extern void* ProcessorTransactions(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorCompute")] + public static extern void* ProcessorCompute(void* ctx, void* obj, void* prj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorMessage")] + public static extern void* ProcessorMessage(void* ctx, void* obj, void* prj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorEvents")] + public static extern void* ProcessorEvents(void* ctx, void* obj, void* prj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorServices")] + public static extern void* ProcessorServices(void* ctx, void* obj, void* prj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorExtensions")] + public static extern void* ProcessorExtensions(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProcessorAtomicLong")] + public static extern void* ProcessorAtomicLong(void* ctx, void* obj, sbyte* name, long initVal, + [MarshalAs(UnmanagedType.U1)] bool create); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTargetInStreamOutLong")] + public static extern long TargetInStreamOutLong(void* ctx, void* target, int opType, long memPtr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTargetInStreamOutStream")] + public static extern void TargetInStreamOutStream(void* ctx, void* target, int opType, long inMemPtr, + long outMemPtr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTargetInStreamOutObject")] + public static extern void* TargetInStreanOutObject(void* ctx, void* target, int opType, long memPtr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTargetInObjectStreamOutStream")] + public static extern void TargetInObjectStreamOutStream(void* ctx, void* target, int opType, + void* arg, long inMemPtr, long outMemPtr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTargetOutLong")] + public static extern long TargetOutLong(void* ctx, void* target, int opType); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTargetOutStream")] + public static extern void TargetOutStream(void* ctx, void* target, int opType, long memPtr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTargetOutObject")] + public static extern void* TargetOutObject(void* ctx, void* target, int opType); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTargetListenFuture")] + public static extern void TargetListenFut(void* ctx, void* target, long futId, int typ); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTargetListenFutureForOperation")] + public static extern void TargetListenFutForOp(void* ctx, void* target, long futId, int typ, int opId); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteAffinityPartitions")] + public static extern int AffinityParts(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheWithSkipStore")] + public static extern void* CacheWithSkipStore(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheWithNoRetries")] + public static extern void* CacheWithNoRetries(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheWithExpiryPolicy")] + public static extern void* CacheWithExpiryPolicy(void* ctx, void* obj, long create, long update, long access); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheWithAsync")] + public static extern void* CacheWithAsync(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheWithKeepPortable")] + public static extern void* CacheWithKeepBinary(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheClear")] + public static extern void CacheClear(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheRemoveAll")] + public static extern void CacheRemoveAll(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheOutOpQueryCursor")] + public static extern void* CacheOutOpQueryCursor(void* ctx, void* obj, int type, long memPtr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheOutOpContinuousQuery")] + public static extern void* CacheOutOpContinuousQuery(void* ctx, void* obj, int type, long memPtr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheIterator")] + public static extern void* CacheIterator(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheLocalIterator")] + public static extern void* CacheLocalIterator(void* ctx, void* obj, int peekModes); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheEnterLock")] + public static extern void CacheEnterLock(void* ctx, void* obj, long id); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheExitLock")] + public static extern void CacheExitLock(void* ctx, void* obj, long id); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheTryEnterLock")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool CacheTryEnterLock(void* ctx, void* obj, long id, long timeout); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheCloseLock")] + public static extern void CacheCloseLock(void* ctx, void* obj, long id); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheRebalance")] + public static extern void CacheRebalance(void* ctx, void* obj, long futId); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheSize")] + public static extern int CacheSize(void* ctx, void* obj, int peekModes, [MarshalAs(UnmanagedType.U1)] bool loc); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCacheStoreCallbackInvoke")] + public static extern void CacheStoreCallbackInvoke(void* ctx, void* obj, long memPtr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteComputeWithNoFailover")] + public static extern void ComputeWithNoFailover(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteComputeWithTimeout")] + public static extern void ComputeWithTimeout(void* ctx, void* target, long timeout); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteComputeExecuteNative")] + public static extern void ComputeExecuteNative(void* ctx, void* target, long taskPtr, long topVer); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteContinuousQueryClose")] + public static extern void ContinuousQryClose(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteContinuousQueryGetInitialQueryCursor")] + public static extern void* ContinuousQryGetInitialQueryCursor(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDataStreamerListenTopology")] + public static extern void DataStreamerListenTop(void* ctx, void* obj, long ptr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDataStreamerAllowOverwriteGet")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool DataStreamerAllowOverwriteGet(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDataStreamerAllowOverwriteSet")] + public static extern void DataStreamerAllowOverwriteSet(void* ctx, void* obj, + [MarshalAs(UnmanagedType.U1)] bool val); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDataStreamerSkipStoreGet")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool DataStreamerSkipStoreGet(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDataStreamerSkipStoreSet")] + public static extern void DataStreamerSkipStoreSet(void* ctx, void* obj, + [MarshalAs(UnmanagedType.U1)] bool val); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDataStreamerPerNodeBufferSizeGet")] + public static extern int DataStreamerPerNodeBufferSizeGet(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDataStreamerPerNodeBufferSizeSet")] + public static extern void DataStreamerPerNodeBufferSizeSet(void* ctx, void* obj, int val); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDataStreamerPerNodeParallelOperationsGet")] + public static extern int DataStreamerPerNodeParallelOpsGet(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDataStreamerPerNodeParallelOperationsSet")] + public static extern void DataStreamerPerNodeParallelOpsSet(void* ctx, void* obj, int val); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteMessagingWithAsync")] + public static extern void* MessagingWithAsync(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProjectionForOthers")] + public static extern void* ProjectionForOthers(void* ctx, void* obj, void* prj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProjectionForRemotes")] + public static extern void* ProjectionForRemotes(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProjectionForDaemons")] + public static extern void* ProjectionForDaemons(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProjectionForRandom")] + public static extern void* ProjectionForRandom(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProjectionForOldest")] + public static extern void* ProjectionForOldest(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProjectionForYoungest")] + public static extern void* ProjectionForYoungest(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProjectionResetMetrics")] + public static extern void ProjectionResetMetrics(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteProjectionOutOpRet")] + public static extern void* ProjectionOutOpRet(void* ctx, void* obj, int type, long memPtr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteQueryCursorIterator")] + public static extern void QryCursorIterator(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteQueryCursorClose")] + public static extern void QryCursorClose(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteAcquire")] + public static extern void* Acquire(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteRelease")] + public static extern void Release(void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTransactionsStart")] + public static extern long TxStart(void* ctx, void* target, int concurrency, int isolation, long timeout, + int txSize); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTransactionsCommit")] + public static extern int TxCommit(void* ctx, void* target, long id); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTransactionsCommitAsync")] + public static extern void TxCommitAsync(void* ctx, void* target, long id, long futId); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTransactionsRollback")] + public static extern int TxRollback(void* ctx, void* target, long id); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTransactionsRollbackAsync")] + public static extern void TxRollbackAsync(void* ctx, void* target, long id, long futId); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTransactionsClose")] + public static extern int TxClose(void* ctx, void* target, long id); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTransactionsState")] + public static extern int TxState(void* ctx, void* target, long id); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTransactionsSetRollbackOnly")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool TxSetRollbackOnly(void* ctx, void* target, long id); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteTransactionsResetMetrics")] + public static extern void TxResetMetrics(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteThrowToJava")] + public static extern void ThrowToJava(void* ctx, char* msg); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteHandlersSize")] + public static extern int HandlersSize(); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteCreateContext")] + public static extern void* CreateContext(void* opts, int optsLen, void* cbs); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDeleteContext")] + public static extern void DeleteContext(void* ptr); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteDestroyJvm")] + public static extern void DestroyJvm(void* ctx); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteEventsWithAsync")] + public static extern void* EventsWithAsync(void* ctx, void* obj); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteEventsStopLocalListen")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool EventsStopLocalListen(void* ctx, void* obj, long hnd); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteEventsLocalListen")] + public static extern void EventsLocalListen(void* ctx, void* obj, long hnd, int type); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteEventsIsEnabled")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool EventsIsEnabled(void* ctx, void* obj, int type); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteServicesWithAsync")] + public static extern void* ServicesWithAsync(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteServicesWithServerKeepPortable")] + public static extern void* ServicesWithServerKeepBinary(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteServicesCancel")] + public static extern long ServicesCancel(void* ctx, void* target, char* name); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteServicesCancelAll")] + public static extern long ServicesCancelAll(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteServicesGetServiceProxy")] + public static extern void* ServicesGetServiceProxy(void* ctx, void* target, char* name, + [MarshalAs(UnmanagedType.U1)] bool sticky); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteAtomicLongGet")] + public static extern long AtomicLongGet(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteAtomicLongIncrementAndGet")] + public static extern long AtomicLongIncrementAndGet(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteAtomicLongAddAndGet")] + public static extern long AtomicLongAddAndGet(void* ctx, void* target, long value); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteAtomicLongDecrementAndGet")] + public static extern long AtomicLongDecrementAndGet(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteAtomicLongGetAndSet")] + public static extern long AtomicLongGetAndSet(void* ctx, void* target, long value); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteAtomicLongCompareAndSetAndGet")] + public static extern long AtomicLongCompareAndSetAndGet(void* ctx, void* target, long expVal, long newVal); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteAtomicLongIsClosed")] + [return: MarshalAs(UnmanagedType.U1)] + public static extern bool AtomicLongIsClosed(void* ctx, void* target); + + [DllImport(IgniteUtils.FileIgniteJniDll, EntryPoint = "IgniteAtomicLongClose")] + public static extern void AtomicLongClose(void* ctx, void* target); + } +} \ No newline at end of file