ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [55/82] [abbrv] ignite git commit: IGNITE-1336: Implemented callback extensions.
Date Tue, 01 Sep 2015 12:08:04 GMT
IGNITE-1336: Implemented callback extensions.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d907afc6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d907afc6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d907afc6

Branch: refs/heads/ignite-1093-2
Commit: d907afc669fb4b99e0f0011785415e39abe8b655
Parents: 1335580
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Aug 31 17:41:54 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Aug 31 17:41:54 2015 +0300

----------------------------------------------------------------------
 .../callback/PlatformCallbackGateway.java       | 82 ++++++++++++++++++--
 .../callback/PlatformCallbackUtils.java         | 21 +++++
 2 files changed, 98 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d907afc6/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/callback/PlatformCallbackGateway.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/callback/PlatformCallbackGateway.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/callback/PlatformCallbackGateway.java
index a8e7879..ff376d0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/callback/PlatformCallbackGateway.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/callback/PlatformCallbackGateway.java
@@ -790,7 +790,14 @@ public class PlatformCallbackGateway {
      * @throws org.apache.ignite.IgniteCheckedException In case of error.
      */
     public long serviceInit(long memPtr) throws IgniteCheckedException {
-        return PlatformCallbackUtils.serviceInit(envPtr, memPtr);
+        enter();
+
+        try {
+            return PlatformCallbackUtils.serviceInit(envPtr, memPtr);
+        }
+        finally {
+            leave();
+        }
     }
 
     /**
@@ -801,7 +808,14 @@ public class PlatformCallbackGateway {
      * @throws org.apache.ignite.IgniteCheckedException In case of error.
      */
     public void serviceExecute(long svcPtr, long memPtr) throws IgniteCheckedException {
-        PlatformCallbackUtils.serviceExecute(envPtr, svcPtr, memPtr);
+        enter();
+
+        try {
+            PlatformCallbackUtils.serviceExecute(envPtr, svcPtr, memPtr);
+        }
+        finally {
+            leave();
+        }
     }
 
     /**
@@ -812,7 +826,14 @@ public class PlatformCallbackGateway {
      * @throws org.apache.ignite.IgniteCheckedException In case of error.
      */
     public void serviceCancel(long svcPtr, long memPtr) throws IgniteCheckedException {
-        PlatformCallbackUtils.serviceCancel(envPtr, svcPtr, memPtr);
+        enter();
+
+        try {
+            PlatformCallbackUtils.serviceCancel(envPtr, svcPtr, memPtr);
+        }
+        finally {
+            leave();
+        }
     }
 
     /**
@@ -824,7 +845,14 @@ public class PlatformCallbackGateway {
      * @throws org.apache.ignite.IgniteCheckedException In case of error.
      */
     public void serviceInvokeMethod(long svcPtr, long outMemPtr, long inMemPtr) throws IgniteCheckedException
{
-        PlatformCallbackUtils.serviceInvokeMethod(envPtr, svcPtr, outMemPtr, inMemPtr);
+        enter();
+
+        try {
+            PlatformCallbackUtils.serviceInvokeMethod(envPtr, svcPtr, outMemPtr, inMemPtr);
+        }
+        finally {
+            leave();
+        }
     }
 
     /**
@@ -833,7 +861,51 @@ public class PlatformCallbackGateway {
      * @param memPtr Stream pointer.
      */
     public int clusterNodeFilterApply(long memPtr) {
-        return PlatformCallbackUtils.clusterNodeFilterApply(envPtr, memPtr);
+        enter();
+
+        try {
+            return PlatformCallbackUtils.clusterNodeFilterApply(envPtr, memPtr);
+        }
+        finally {
+            leave();
+        }
+    }
+
+    /**
+     * Extension callback accepting single long argument and returning long result.
+     *
+     * @param typ Operation type.
+     * @param arg1 Argument 1.
+     * @return Long result.
+     */
+    public long extensionCallbackInLongOutLong(int typ, long arg1) {
+        enter();
+
+        try {
+            return PlatformCallbackUtils.extensionCallbackInLongOutLong(envPtr, typ, arg1);
+        }
+        finally {
+            leave();
+        }
+    }
+
+    /**
+     * Extension callback accepting two long arguments and returning long result.
+     *
+     * @param typ Operation type.
+     * @param arg1 Argument 1.
+     * @param arg2 Argument 2.
+     * @return Long result.
+     */
+    public long extensionCallbackInLongLongOutLong(int typ, long arg1, long arg2) {
+        enter();
+
+        try {
+            return PlatformCallbackUtils.extensionCallbackInLongLongOutLong(envPtr, typ,
arg1, arg2);
+        }
+        finally {
+            leave();
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/d907afc6/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/callback/PlatformCallbackUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/callback/PlatformCallbackUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/callback/PlatformCallbackUtils.java
index 7e9587f..804012c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/callback/PlatformCallbackUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/callback/PlatformCallbackUtils.java
@@ -460,6 +460,27 @@ public class PlatformCallbackUtils {
     static native int clusterNodeFilterApply(long envPtr, long memPtr);
 
     /**
+     * Extension callback accepting single long argument and returning long result.
+     *
+     * @param envPtr Environment pointer.
+     * @param typ Operation type.
+     * @param arg1 Argument 1.
+     * @return Long result.
+     */
+    static native long extensionCallbackInLongOutLong(long envPtr, int typ, long arg1);
+
+    /**
+     * Extension callback accepting two long arguments and returning long result.
+     *
+     * @param envPtr Environment pointer.
+     * @param typ Operation type.
+     * @param arg1 Argument 1.
+     * @param arg2 Argument 2.
+     * @return Long result.
+     */
+    static native long extensionCallbackInLongLongOutLong(long envPtr, int typ, long arg1,
long arg2);
+
+    /**
      * Private constructor.
      */
     private PlatformCallbackUtils() {


Mime
View raw message