NSAmelchev commented on a change in pull request #50:
URL: https://github.com/apache/ignite-extensions/pull/50#discussion_r603660843



##########
File path: 
modules/spring-tx-ext/examples/main/java/org/apache/ignite/transactions/spring/examples/IgniteClientTransactionalService.java
##########
@@ -0,0 +1,128 @@
+/*
+ * 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.transactions.spring.examples;
+
+import java.io.Serializable;
+import java.util.Objects;
+import org.apache.ignite.client.ClientCache;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import static 
org.springframework.transaction.annotation.Isolation.READ_COMMITTED;
+import static 
org.springframework.transaction.annotation.Isolation.REPEATABLE_READ;
+
+/**
+ * Represents Spring Service that uses Ignite thin client to access Ignite 
cluster and perform cache transactional
+ * operations.
+ */
+@Service
+public class IgniteClientTransactionalService {
+    /** Ignite cache representation that uses thin client to communicate with 
Ignite cluster. */
+    private ClientCache<String, Account> cache;
+
+    /**
+     * The emitters transfer the specified funds to the broker. When both 
funds are received, they are transferred to
+     * the recipient, excluding the fee which the broker keeps for himself. If 
an error occurs at any step of this
+     * operation, it is rolled back.
+     */
+    @Transactional(isolation = REPEATABLE_READ)
+    public void transferFundsWithBroker(String firstEmitter, String 
secondEmitter, String recipient, String broker, int funds, int fee) {

Review comment:
       Too long line




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to