GridGain C++
java.h
1 /*
2  * Copyright 2019 GridGain Systems, Inc. and Contributors.
3  *
4  * Licensed under the GridGain Community Edition License (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef _IGNITE_JNI_JAVA
18 #define _IGNITE_JNI_JAVA
19 
20 #include <stdint.h>
21 
22 #include <jni.h>
23 
24 #include <ignite/common/common.h>
25 
26 namespace ignite
27 {
28  namespace jni
29  {
30  namespace java
31  {
32  /* Handlers for callbacks from Java. */
33  typedef int64_t(JNICALL *CacheStoreCreateHandler)(void* target, int64_t memPtr);
34  typedef int(JNICALL *CacheStoreInvokeHandler)(void* target, int64_t objPtr, int64_t memPtr);
35  typedef void(JNICALL *CacheStoreDestroyHandler)(void* target, int64_t objPtr);
36  typedef int64_t(JNICALL *CacheStoreSessionCreateHandler)(void* target, int64_t storePtr);
37 
38  typedef int64_t(JNICALL *CacheEntryFilterCreateHandler)(void* target, int64_t memPtr);
39  typedef int(JNICALL *CacheEntryFilterApplyHandler)(void* target, int64_t ptr, int64_t memPtr);
40  typedef void(JNICALL *CacheEntryFilterDestroyHandler)(void* target, int64_t ptr);
41 
42  typedef void(JNICALL *CacheInvokeHandler)(void* target, int64_t inMemPtr, int64_t outMemPtr);
43 
44  typedef void(JNICALL *ComputeTaskMapHandler)(void* target, int64_t taskPtr, int64_t inMemPtr, int64_t outMemPtr);
45  typedef int(JNICALL *ComputeTaskJobResultHandler)(void* target, int64_t taskPtr, int64_t jobPtr, int64_t memPtr);
46  typedef void(JNICALL *ComputeTaskReduceHandler)(void* target, int64_t taskPtr);
47  typedef void(JNICALL *ComputeTaskCompleteHandler)(void* target, int64_t taskPtr, int64_t memPtr);
48  typedef int(JNICALL *ComputeJobSerializeHandler)(void* target, int64_t jobPtr, int64_t memPtr);
49  typedef int64_t(JNICALL *ComputeJobCreateHandler)(void* target, int64_t memPtr);
50  typedef void(JNICALL *ComputeJobExecuteHandler)(void* target, int64_t jobPtr, int cancel, int64_t memPtr);
51  typedef void(JNICALL *ComputeJobCancelHandler)(void* target, int64_t jobPtr);
52  typedef void(JNICALL *ComputeJobDestroyHandler)(void* target, int64_t jobPtr);
53 
54  typedef void(JNICALL *ContinuousQueryListenerApplyHandler)(void* target, int64_t lsnrPtr, int64_t memPtr);
55  typedef int64_t(JNICALL *ContinuousQueryFilterCreateHandler)(void* target, int64_t memPtr);
56  typedef int(JNICALL *ContinuousQueryFilterApplyHandler)(void* target, int64_t filterPtr, int64_t memPtr);
57  typedef void(JNICALL *ContinuousQueryFilterReleaseHandler)(void* target, int64_t filterPtr);
58 
59  typedef void(JNICALL *DataStreamerTopologyUpdateHandler)(void* target, int64_t ldrPtr, int64_t topVer, int topSize);
60  typedef void(JNICALL *DataStreamerStreamReceiverInvokeHandler)(void* target, int64_t ptr, void* cache, int64_t memPtr, unsigned char keepPortable);
61 
62  typedef void(JNICALL *FutureByteResultHandler)(void* target, int64_t futAddr, int res);
63  typedef void(JNICALL *FutureBoolResultHandler)(void* target, int64_t futAddr, int res);
64  typedef void(JNICALL *FutureShortResultHandler)(void* target, int64_t futAddr, int res);
65  typedef void(JNICALL *FutureCharResultHandler)(void* target, int64_t futAddr, int res);
66  typedef void(JNICALL *FutureIntResultHandler)(void* target, int64_t futAddr, int res);
67  typedef void(JNICALL *FutureFloatResultHandler)(void* target, int64_t futAddr, float res);
68  typedef void(JNICALL *FutureLongResultHandler)(void* target, int64_t futAddr, int64_t res);
69  typedef void(JNICALL *FutureDoubleResultHandler)(void* target, int64_t futAddr, double res);
70  typedef void(JNICALL *FutureObjectResultHandler)(void* target, int64_t futAddr, int64_t memPtr);
71  typedef void(JNICALL *FutureNullResultHandler)(void* target, int64_t futAddr);
72  typedef void(JNICALL *FutureErrorHandler)(void* target, int64_t futAddr, int64_t memPtr);
73 
74  typedef void(JNICALL *LifecycleEventHandler)(void* target, int64_t ptr, int evt);
75 
76  typedef void(JNICALL *MemoryReallocateHandler)(void* target, int64_t memPtr, int cap);
77 
78  typedef int64_t(JNICALL *MessagingFilterCreateHandler)(void* target, int64_t memPtr);
79  typedef int(JNICALL *MessagingFilterApplyHandler)(void* target, int64_t ptr, int64_t memPtr);
80  typedef void(JNICALL *MessagingFilterDestroyHandler)(void* target, int64_t ptr);
81 
82  typedef int64_t(JNICALL *EventFilterCreateHandler)(void* target, int64_t memPtr);
83  typedef int(JNICALL *EventFilterApplyHandler)(void* target, int64_t ptr, int64_t memPtr);
84  typedef void(JNICALL *EventFilterDestroyHandler)(void* target, int64_t ptr);
85 
86  typedef int64_t(JNICALL *ServiceInitHandler)(void* target, int64_t memPtr);
87  typedef void(JNICALL *ServiceExecuteHandler)(void* target, int64_t svcPtr, int64_t memPtr);
88  typedef void(JNICALL *ServiceCancelHandler)(void* target, int64_t svcPtr, int64_t memPtr);
89  typedef void(JNICALL *ServiceInvokeMethodHandler)(void* target, int64_t svcPtr, int64_t inMemPtr, int64_t outMemPtr);
90  typedef int(JNICALL *ClusterNodeFilterApplyHandler)(void* target, int64_t memPtr);
91 
92  typedef int64_t(JNICALL *NodeInfoHandler)(void* target, int64_t memPtr);
93 
94  typedef void(JNICALL *OnStartHandler)(void* target, void* proc, int64_t memPtr);
95  typedef void(JNICALL *OnStopHandler)(void* target);
96  typedef void(JNICALL *ErrorHandler)(void* target, int errCode, const char* errClsChars, int errClsCharsLen, const char* errMsgChars, int errMsgCharsLen, const char* stackTraceChars, int stackTraceCharsLen, void* errData, int errDataLen);
97 
98  typedef int64_t(JNICALL *ExtensionCallbackInLongOutLongHandler)(void* target, int typ, int64_t arg1);
99  typedef int64_t(JNICALL *ExtensionCallbackInLongLongOutLongHandler)(void* target, int typ, int64_t arg1, int64_t arg2);
100 
101  typedef void(JNICALL *OnClientDisconnectedHandler)(void* target);
102  typedef void(JNICALL *OnClientReconnectedHandler)(void* target, unsigned char clusterRestarted);
103 
104  typedef int64_t(JNICALL *AffinityFunctionInitHandler)(void* target, int64_t memPtr, void* baseFunc);
105  typedef int(JNICALL *AffinityFunctionPartitionHandler)(void* target, int64_t ptr, int64_t memPtr);
106  typedef void(JNICALL *AffinityFunctionAssignPartitionsHandler)(void* target, int64_t ptr, int64_t inMemPtr, int64_t outMemPtr);
107  typedef void(JNICALL *AffinityFunctionRemoveNodeHandler)(void* target, int64_t ptr, int64_t memPtr);
108  typedef void(JNICALL *AffinityFunctionDestroyHandler)(void* target, int64_t ptr);
109 
110  typedef void(JNICALL *ConsoleWriteHandler)(const char* chars, int charsLen, unsigned char isErr);
111 
112  typedef void(JNICALL *LoggerLogHandler)(void* target, int level, const char* messageChars, int messageCharsLen, const char* categoryChars, int categoryCharsLen, const char* errorInfoChars, int errorInfoCharsLen, int64_t memPtr);
113  typedef bool(JNICALL *LoggerIsLevelEnabledHandler)(void* target, int level);
114 
115  typedef int64_t(JNICALL *InLongOutLongHandler)(void* target, int type, int64_t val);
116  typedef int64_t(JNICALL *InLongLongLongObjectOutLongHandler)(void* target, int type, int64_t val1, int64_t val2, int64_t val3, void* arg);
117 
123  bool IsJava9OrLater();
124 
128  struct JniHandlers {
129  void* target;
130 
131  ErrorHandler error;
132 
133  LoggerLogHandler loggerLog;
134  LoggerIsLevelEnabledHandler loggerIsLevelEnabled;
135 
136  InLongOutLongHandler inLongOutLong;
137  InLongLongLongObjectOutLongHandler inLongLongLongObjectOutLong;
138  };
139 
143  struct JniJavaMembers {
144  jclass c_Class;
145  jmethodID m_Class_getName;
146 
147  jclass c_Throwable;
148  jmethodID m_Throwable_getMessage;
149  jmethodID m_Throwable_printStackTrace;
150 
151  jclass c_PlatformUtils;
152  jmethodID m_PlatformUtils_getFullStackTrace;
153 
157  void Initialize(JNIEnv* env);
158 
162  void Destroy(JNIEnv* env);
163 
167  bool WriteErrorInfo(JNIEnv* env, char** errClsName, int* errClsNameLen, char** errMsg, int* errMsgLen,
168  char** stackTrace, int* stackTraceLen);
169  };
170 
174  struct JniMembers {
175  jclass c_IgniteException;
176 
177  jclass c_PlatformIgnition;
178  jmethodID m_PlatformIgnition_start;
179  jmethodID m_PlatformIgnition_instance;
180  jmethodID m_PlatformIgnition_environmentPointer;
181  jmethodID m_PlatformIgnition_stop;
182  jmethodID m_PlatformIgnition_stopAll;
183 
184  jclass c_PlatformTarget;
185  jmethodID m_PlatformTarget_inLongOutLong;
186  jmethodID m_PlatformTarget_inStreamOutLong;
187  jmethodID m_PlatformTarget_inStreamOutObject;
188  jmethodID m_PlatformTarget_outStream;
189  jmethodID m_PlatformTarget_outObject;
190  jmethodID m_PlatformTarget_inStreamAsync;
191  jmethodID m_PlatformTarget_inStreamOutObjectAsync;
192  jmethodID m_PlatformTarget_inStreamOutStream;
193  jmethodID m_PlatformTarget_inObjectStreamOutObjectStream;
194 
195  jclass c_PlatformUtils;
196  jmethodID m_PlatformUtils_reallocate;
197  jmethodID m_PlatformUtils_errData;
198 
202  void Initialize(JNIEnv* env);
203 
207  void Destroy(JNIEnv* env);
208  };
209 
213  class IGNITE_IMPORT_EXPORT JniJvm {
214  public:
218  JniJvm();
219 
227  JniJvm(JavaVM* jvm, JniJavaMembers javaMembers, JniMembers members);
228 
234  JavaVM* GetJvm();
235 
241  JniJavaMembers& GetJavaMembers();
242 
248  JniMembers& GetMembers();
249  private:
251  JavaVM* jvm;
252 
254  JniJavaMembers javaMembers;
255 
257  JniMembers members;
258  };
259 
263  struct IGNITE_IMPORT_EXPORT JniErrorInfo
264  {
265  int code;
266  char* errCls;
267  char* errMsg;
268 
272  JniErrorInfo();
273 
281  JniErrorInfo(int code, const char* errCls, const char* errMsg);
282 
288  JniErrorInfo(const JniErrorInfo& other);
289 
296  JniErrorInfo& operator=(const JniErrorInfo& other);
297 
301  ~JniErrorInfo();
302  };
303 
307  class IGNITE_IMPORT_EXPORT JniContext {
308  public:
309  static JniContext* Create(char** opts, int optsLen, JniHandlers hnds);
310  static JniContext* Create(char** opts, int optsLen, JniHandlers hnds, JniErrorInfo* errInfo);
311  static int Reallocate(int64_t memPtr, int cap);
312  static void Detach();
313  static void Release(jobject obj);
314  static void SetConsoleHandler(ConsoleWriteHandler consoleHandler);
315  static int RemoveConsoleHandler(ConsoleWriteHandler consoleHandler);
316 
317  void IgnitionStart(char* cfgPath, char* name, int factoryId, int64_t dataPtr);
318  void IgnitionStart(char* cfgPath, char* name, int factoryId, int64_t dataPtr, JniErrorInfo* errInfo);
319  int64_t IgnitionEnvironmentPointer(char* name);
320  int64_t IgnitionEnvironmentPointer(char* name, JniErrorInfo* errInfo);
321  bool IgnitionStop(char* name, bool cancel);
322  bool IgnitionStop(char* name, bool cancel, JniErrorInfo* errInfo);
323  void IgnitionStopAll(bool cancel);
324  void IgnitionStopAll(bool cancel, JniErrorInfo* errInfo);
325 
326  int64_t TargetInLongOutLong(jobject obj, int type, int64_t memPtr, JniErrorInfo* errInfo = NULL);
327  int64_t TargetInStreamOutLong(jobject obj, int type, int64_t memPtr, JniErrorInfo* errInfo = NULL);
328  void TargetInStreamOutStream(jobject obj, int opType, int64_t inMemPtr, int64_t outMemPtr, JniErrorInfo* errInfo = NULL);
329  jobject TargetInStreamOutObject(jobject obj, int type, int64_t memPtr, JniErrorInfo* errInfo = NULL);
330  jobject TargetInObjectStreamOutObjectStream(jobject obj, int opType, void* arg, int64_t inMemPtr, int64_t outMemPtr, JniErrorInfo* errInfo = NULL);
331  void TargetOutStream(jobject obj, int opType, int64_t memPtr, JniErrorInfo* errInfo = NULL);
332  jobject TargetOutObject(jobject obj, int opType, JniErrorInfo* errInfo = NULL);
333  void TargetInStreamAsync(jobject obj, int type, int64_t memPtr, JniErrorInfo* errInfo = NULL);
334  jobject TargetInStreamOutObjectAsync(jobject obj, int type, int64_t memPtr, JniErrorInfo* errInfo = NULL);
335 
336  jobject CacheOutOpQueryCursor(jobject obj, int type, int64_t memPtr, JniErrorInfo* errInfo = NULL);
337  jobject CacheOutOpContinuousQuery(jobject obj, int type, int64_t memPtr, JniErrorInfo* errInfo = NULL);
338 
339  jobject Acquire(jobject obj);
340 
341  void DestroyJvm();
342  void ThrowToJava(char* errMsg);
343  private:
344  JniJvm* jvm;
345  JniHandlers hnds;
346 
347  JniContext(JniJvm* jvm, JniHandlers hnds);
348 
349  JNIEnv* Attach();
350  void ExceptionCheck(JNIEnv* env);
351  void ExceptionCheck(JNIEnv* env, JniErrorInfo* errInfo);
352  jobject LocalToGlobal(JNIEnv* env, jobject obj);
353  };
354 
355  JNIEXPORT jlong JNICALL JniCacheStoreCreate(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr);
356  JNIEXPORT jint JNICALL JniCacheStoreInvoke(JNIEnv *env, jclass cls, jlong envPtr, jlong objPtr, jlong memPtr);
357  JNIEXPORT void JNICALL JniCacheStoreDestroy(JNIEnv *env, jclass cls, jlong envPtr, jlong objPtr);
358  JNIEXPORT jlong JNICALL JniCacheStoreSessionCreate(JNIEnv *env, jclass cls, jlong envPtr, jlong storePtr);
359 
360  JNIEXPORT jlong JNICALL JniCacheEntryFilterCreate(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr);
361  JNIEXPORT jint JNICALL JniCacheEntryFilterApply(JNIEnv *env, jclass cls, jlong envPtr, jlong objPtr, jlong memPtr);
362  JNIEXPORT void JNICALL JniCacheEntryFilterDestroy(JNIEnv *env, jclass cls, jlong envPtr, jlong objPtr);
363 
364  JNIEXPORT void JNICALL JniCacheInvoke(JNIEnv *env, jclass cls, jlong envPtr, jlong inMemPtr, jlong outMemPtr);
365 
366  JNIEXPORT void JNICALL JniComputeTaskMap(JNIEnv *env, jclass cls, jlong envPtr, jlong taskPtr, jlong inMemPtr, jlong outMemPtr);
367  JNIEXPORT jint JNICALL JniComputeTaskJobResult(JNIEnv *env, jclass cls, jlong envPtr, jlong taskPtr, jlong jobPtr, jlong memPtr);
368  JNIEXPORT void JNICALL JniComputeTaskReduce(JNIEnv *env, jclass cls, jlong envPtr, jlong taskPtr);
369  JNIEXPORT void JNICALL JniComputeTaskComplete(JNIEnv *env, jclass cls, jlong envPtr, jlong taskPtr, jlong memPtr);
370  JNIEXPORT jint JNICALL JniComputeJobSerialize(JNIEnv *env, jclass cls, jlong envPtr, jlong jobPtr, jlong memPtr);
371  JNIEXPORT jlong JNICALL JniComputeJobCreate(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr);
372  JNIEXPORT void JNICALL JniComputeJobExecute(JNIEnv *env, jclass cls, jlong envPtr, jlong jobPtr, jint cancel, jlong memPtr);
373  JNIEXPORT void JNICALL JniComputeJobCancel(JNIEnv *env, jclass cls, jlong envPtr, jlong jobPtr);
374  JNIEXPORT void JNICALL JniComputeJobDestroy(JNIEnv *env, jclass cls, jlong envPtr, jlong jobPtr);
375 
376  JNIEXPORT void JNICALL JniContinuousQueryListenerApply(JNIEnv *env, jclass cls, jlong envPtr, jlong cbPtr, jlong memPtr);
377  JNIEXPORT jlong JNICALL JniContinuousQueryFilterCreate(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr);
378  JNIEXPORT jint JNICALL JniContinuousQueryFilterApply(JNIEnv *env, jclass cls, jlong envPtr, jlong filterPtr, jlong memPtr);
379  JNIEXPORT void JNICALL JniContinuousQueryFilterRelease(JNIEnv *env, jclass cls, jlong envPtr, jlong filterPtr);
380 
381  JNIEXPORT void JNICALL JniDataStreamerTopologyUpdate(JNIEnv *env, jclass cls, jlong envPtr, jlong ldrPtr, jlong topVer, jint topSize);
382  JNIEXPORT void JNICALL JniDataStreamerStreamReceiverInvoke(JNIEnv *env, jclass cls, jlong envPtr, jlong ptr, jobject cache, jlong memPtr, jboolean keepPortable);
383 
384  JNIEXPORT void JNICALL JniFutureByteResult(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr, jint res);
385  JNIEXPORT void JNICALL JniFutureBoolResult(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr, jint res);
386  JNIEXPORT void JNICALL JniFutureShortResult(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr, jint res);
387  JNIEXPORT void JNICALL JniFutureCharResult(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr, jint res);
388  JNIEXPORT void JNICALL JniFutureIntResult(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr, jint res);
389  JNIEXPORT void JNICALL JniFutureFloatResult(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr, jfloat res);
390  JNIEXPORT void JNICALL JniFutureLongResult(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr, jlong res);
391  JNIEXPORT void JNICALL JniFutureDoubleResult(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr, jdouble res);
392  JNIEXPORT void JNICALL JniFutureObjectResult(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr, jlong memPtr);
393  JNIEXPORT void JNICALL JniFutureNullResult(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr);
394  JNIEXPORT void JNICALL JniFutureError(JNIEnv *env, jclass cls, jlong envPtr, jlong futPtr, jlong memPtr);
395 
396  JNIEXPORT void JNICALL JniLifecycleEvent(JNIEnv *env, jclass cls, jlong envPtr, jlong ptr, jint evt);
397 
398  JNIEXPORT void JNICALL JniMemoryReallocate(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr, jint cap);
399 
400  JNIEXPORT jlong JNICALL JniMessagingFilterCreate(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr);
401  JNIEXPORT jint JNICALL JniMessagingFilterApply(JNIEnv *env, jclass cls, jlong envPtr, jlong ptr, jlong memPtr);
402  JNIEXPORT void JNICALL JniMessagingFilterDestroy(JNIEnv *env, jclass cls, jlong envPtr, jlong ptr);
403 
404  JNIEXPORT jlong JNICALL JniEventFilterCreate(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr);
405  JNIEXPORT jint JNICALL JniEventFilterApply(JNIEnv *env, jclass cls, jlong envPtr, jlong ptr, jlong memPtr);
406  JNIEXPORT void JNICALL JniEventFilterDestroy(JNIEnv *env, jclass cls, jlong envPtr, jlong ptr);
407 
408  JNIEXPORT jlong JNICALL JniServiceInit(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr);
409  JNIEXPORT void JNICALL JniServiceExecute(JNIEnv *env, jclass cls, jlong envPtr, jlong svcPtr, jlong memPtr);
410  JNIEXPORT void JNICALL JniServiceCancel(JNIEnv *env, jclass cls, jlong envPtr, jlong svcPtr, jlong memPtr);
411  JNIEXPORT void JNICALL JniServiceInvokeMethod(JNIEnv *env, jclass cls, jlong envPtr, jlong svcPtr, jlong inMemPtr, jlong outMemPtr);
412  JNIEXPORT jint JNICALL JniClusterNodeFilterApply(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr);
413 
414  JNIEXPORT jlong JNICALL JniNodeInfo(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr);
415 
416  JNIEXPORT void JNICALL JniOnStart(JNIEnv *env, jclass cls, jlong envPtr, jobject proc, jlong memPtr);
417  JNIEXPORT void JNICALL JniOnStop(JNIEnv *env, jclass cls, jlong envPtr);
418 
419  JNIEXPORT jlong JNICALL JniExtensionCallbackInLongOutLong(JNIEnv *env, jclass cls, jlong envPtr, jint typ, jlong arg1);
420  JNIEXPORT jlong JNICALL JniExtensionCallbackInLongLongOutLong(JNIEnv *env, jclass cls, jlong envPtr, jint typ, jlong arg1, jlong arg2);
421 
422  JNIEXPORT void JNICALL JniOnClientDisconnected(JNIEnv *env, jclass cls, jlong envPtr);
423  JNIEXPORT void JNICALL JniOnClientReconnected(JNIEnv *env, jclass cls, jlong envPtr, jboolean clusterRestarted);
424 
425  JNIEXPORT jlong JNICALL JniAffinityFunctionInit(JNIEnv *env, jclass cls, jlong envPtr, jlong memPtr, jobject baseFunc);
426  JNIEXPORT jint JNICALL JniAffinityFunctionPartition(JNIEnv *env, jclass cls, jlong envPtr, jlong ptr, jlong memPtr);
427  JNIEXPORT void JNICALL JniAffinityFunctionAssignPartitions(JNIEnv *env, jclass cls, jlong envPtr, jlong ptr, jlong inMemPtr, jlong outMemPtr);
428  JNIEXPORT void JNICALL JniAffinityFunctionRemoveNode(JNIEnv *env, jclass cls, jlong envPtr, jlong ptr, jlong memPtr);
429  JNIEXPORT void JNICALL JniAffinityFunctionDestroy(JNIEnv *env, jclass cls, jlong envPtr, jlong ptr);
430 
431  JNIEXPORT void JNICALL JniConsoleWrite(JNIEnv *env, jclass cls, jstring str, jboolean isErr);
432 
433  JNIEXPORT void JNICALL JniLoggerLog(JNIEnv *env, jclass cls, jlong envPtr, jint level, jstring message, jstring category, jstring errorInfo, jlong memPtr);
434  JNIEXPORT jboolean JNICALL JniLoggerIsLevelEnabled(JNIEnv *env, jclass cls, jlong envPtr, jint level);
435 
436  JNIEXPORT jlong JNICALL JniInLongOutLong(JNIEnv *env, jclass cls, jlong envPtr, jint type, jlong val);
437  JNIEXPORT jlong JNICALL JniInLongLongLongObjectOutLong(JNIEnv *env, jclass cls, jlong envPtr, jint type, jlong val1, jlong val2, jlong val3, jobject arg);
438  }
439  }
440 }
441 
442 #endif //_IGNITE_JNI_JAVA
ignite
Ignite API.
Definition: cache.h:47
ignite::jni::java::JniJavaMembers
JNI Java members.
Definition: java.h:143
ignite::jni::java::JniJavaMembers::Initialize
void Initialize(JNIEnv *env)
Constructor.
Definition: java.cpp:361
ignite::jni::java::JniMembers::Destroy
void Destroy(JNIEnv *env)
Destroy members releasing all allocated classes.
Definition: java.cpp:453
ignite::jni::java::JniJavaMembers::WriteErrorInfo
bool WriteErrorInfo(JNIEnv *env, char **errClsName, int *errClsNameLen, char **errMsg, int *errMsgLen, char **stackTrace, int *stackTraceLen)
Write error information.
Definition: java.cpp:379
ignite::jni::java::JniErrorInfo
JNI error information.
Definition: java.h:263
ignite::jni::java::JniMembers::Initialize
void Initialize(JNIEnv *env)
Constructor.
Definition: java.cpp:424
ignite::jni::java::JniMembers
JNI members.
Definition: java.h:174
ignite::jni::java::JniJavaMembers::Destroy
void Destroy(JNIEnv *env)
Destroy members releasing all allocated classes.
Definition: java.cpp:373
ignite::jni::java::JniHandlers
JNI handlers holder.
Definition: java.h:128
ignite::jni::java::JniJvm
JNI JVM wrapper.
Definition: java.h:213
ignite::jni::java::JniContext
Unmanaged context.
Definition: java.h:307