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 72D60101F8 for ; Wed, 26 Aug 2015 13:49:36 +0000 (UTC) Received: (qmail 81189 invoked by uid 500); 26 Aug 2015 13:49:36 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 81153 invoked by uid 500); 26 Aug 2015 13:49:36 -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 81130 invoked by uid 99); 26 Aug 2015 13:49:36 -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; Wed, 26 Aug 2015 13:49:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EFB90E6B10; Wed, 26 Aug 2015 13:49:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Wed, 26 Aug 2015 13:49:38 -0000 Message-Id: <7434d563988c4beb8f1a49cffaa38619@git.apache.org> In-Reply-To: <46c14b33593b4c09b836dbbf0728e7e3@git.apache.org> References: <46c14b33593b4c09b836dbbf0728e7e3@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [04/14] ignite git commit: Moved InteropTarget interface to Ignite. Moved InteropTarget interface to Ignite. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/93821183 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/93821183 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/93821183 Branch: refs/heads/ignite-1124 Commit: 93821183ae44cf1b1d0fd5c3ed30b65f611d2da6 Parents: a43e80a Author: vozerov-gridgain Authored: Wed Aug 26 13:19:25 2015 +0300 Committer: vozerov-gridgain Committed: Wed Aug 26 13:19:25 2015 +0300 ---------------------------------------------------------------------- .../processors/platform/PlatformTarget.java | 76 ++++++++++++++++++++ 1 file changed, 76 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/93821183/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformTarget.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformTarget.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformTarget.java new file mode 100644 index 0000000..1d54b4e --- /dev/null +++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformTarget.java @@ -0,0 +1,76 @@ +/* + * 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. + */ + +package org.apache.ignite.internal.processors.platform; + +import org.jetbrains.annotations.*; + +/** + * Interop target abstraction. + */ +@SuppressWarnings("UnusedDeclaration") +public interface PlatformTarget { + /** + * Synchronous IN operation. + * + * @param type Operation type. + * @param memPtr Memory pointer. + * @return Value specific for the given operation otherwise. + * @throws Exception If failed. + */ + public int inOp(int type, long memPtr) throws Exception; + + /** + * Synchronous IN operation which returns managed object as result. + * + * @param type Operation type. + * @param memPtr Memory pointer. + * @return Managed result. + * @throws Exception If case of failure. + */ + public Object inOpObject(int type, long memPtr) throws Exception; + + /** + * Synchronous OUT operation. + * + * @param type Operation type. + * @param memPtr Memory pointer. + * @throws Exception In case of failure. + */ + public void outOp(int type, long memPtr) throws Exception; + + /** + * Synchronous IN-OUT operation. + * + * @param type Operation type. + * @param inMemPtr Input memory pointer. + * @param outMemPtr Output memory pointer. + * @throws Exception In case of failure. + */ + public void inOutOp(int type, long inMemPtr, long outMemPtr) throws Exception; + + /** + * Synchronous IN-OUT operation with optional argument. + * + * @param type Operation type. + * @param inMemPtr Input memory pointer. + * @param outMemPtr Output memory pointer. + * @param arg Argument (optional). + * @throws Exception In case of failure. + */ + public void inOutOp(int type, long inMemPtr, long outMemPtr, @Nullable Object arg) throws Exception; +}