ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [5/6] incubator-ignite git commit: # ignite-648: empty implementation of transactions
Date Mon, 22 Jun 2015 17:02:23 GMT
# ignite-648: empty implementation of transactions


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

Branch: refs/heads/ignite-648
Commit: 2e6fd9b0386bad0836485ef74a18d3dc27837398
Parents: dc674a1
Author: ashutak <ashutak@gridgain.com>
Authored: Mon Jun 22 17:37:08 2015 +0300
Committer: ashutak <ashutak@gridgain.com>
Committed: Mon Jun 22 17:37:08 2015 +0300

----------------------------------------------------------------------
 .../multijvm/framework/IgniteProcessProxy.java  |  2 +-
 .../IgniteTransactionsProcessProxy.java         | 78 ++++++++++++++++++++
 2 files changed, 79 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e6fd9b0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/framework/IgniteProcessProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/framework/IgniteProcessProxy.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/framework/IgniteProcessProxy.java
index 95ce583..1d11dc3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/framework/IgniteProcessProxy.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/framework/IgniteProcessProxy.java
@@ -375,7 +375,7 @@ public class IgniteProcessProxy implements IgniteEx {
 
     /** {@inheritDoc} */
     @Override public IgniteTransactions transactions() {
-        return null; // TODO: CODE: implement.
+        return new IgniteTransactionsProcessProxy(this);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2e6fd9b0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/framework/IgniteTransactionsProcessProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/framework/IgniteTransactionsProcessProxy.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/framework/IgniteTransactionsProcessProxy.java
new file mode 100644
index 0000000..6464838
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/framework/IgniteTransactionsProcessProxy.java
@@ -0,0 +1,78 @@
+/*
+ * 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.cache.multijvm.framework;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+import org.apache.ignite.transactions.*;
+
+import java.util.*;
+
+/**
+ * Ignite transactions proxy for ignite instance at another JVM.
+ */
+public class IgniteTransactionsProcessProxy implements IgniteTransactions {
+    /** Compute. */
+    private final transient IgniteCompute compute;
+
+    /** Grid id. */
+    private final UUID gridId;
+
+    /**
+     * @param proxy Ignite process proxy.
+     */
+    public IgniteTransactionsProcessProxy(IgniteProcessProxy proxy) {
+        gridId = proxy.getId();
+
+        ClusterGroup grp = proxy.localJvmGrid().cluster().forNodeId(proxy.getId());
+
+        compute = proxy.localJvmGrid().compute(grp);
+    }
+
+    /** {@inheritDoc} */
+    @Override public Transaction txStart() throws IllegalStateException {
+        return null; // TODO: CODE: implement.
+    }
+
+    /** {@inheritDoc} */
+    @Override public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation
isolation) {
+        return null; // TODO: CODE: implement.
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation,
long timeout,
+        int txSize) {
+        return null; // TODO: CODE: implement.
+    }
+
+    /** {@inheritDoc} */
+    @Override public Transaction tx() {
+        return null; // TODO: CODE: implement.
+    }
+
+    /** {@inheritDoc} */
+    @Override public TransactionMetrics metrics() {
+        return null; // TODO: CODE: implement.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void resetMetrics() {
+        // TODO: CODE: implement.
+    }
+}


Mime
View raw message