ololo3000 commented on a change in pull request #46:
URL: https://github.com/apache/ignite-extensions/pull/46#discussion_r583626974



##########
File path: 
modules/spring-cache-ext/src/main/java/org/apache/ignite/cache/spring/IgniteClientSpringCacheManager.java
##########
@@ -0,0 +1,216 @@
+/*
+ * 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.cache.spring;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.locks.Lock;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.client.ClientCache;
+import org.apache.ignite.client.ClientCacheConfiguration;
+import org.apache.ignite.client.IgniteClient;
+import org.apache.ignite.configuration.ClientConfiguration;
+import org.apache.ignite.internal.util.typedef.internal.A;
+import org.apache.ignite.springdata.proxy.IgniteCacheClientProxy;
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.context.ApplicationListener;
+import org.springframework.context.event.ContextRefreshedEvent;
+
+/**
+ * Represents implementation of {@link AbstractCacheManager} that uses thin 
client to connect to an Ignite cluster
+ * and obtain an Ignite cache instance. It requires {@link IgniteClient} 
instance or {@link ClientConfiguration} to be
+ * set before manager use (see {@link #setClientInstance(IgniteClient),
+ * {@link #setClientConfiguration(ClientConfiguration)}}).
+ *
+ *
+ * Note that Spring Cache synchronous mode ({@link Cacheable#sync}) is not 
supported by the current manager
+ * implementation. Instead, use an {@link SpringCacheManager} that uses an 
Ignite thick client to connect to Ignite cluster.
+ *
+ * You can provide Ignite client instance to a Spring configuration XML file, 
like below:
+ *
+ * <pre name="code" class="xml">
+ * &lt;beans xmlns="http://www.springframework.org/schema/beans";
+ *        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ *        xmlns:cache="http://www.springframework.org/schema/cache";
+ *        xsi:schemaLocation="
+ *            http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
+ *            http://www.springframework.org/schema/cache 
http://www.springframework.org/schema/cache/spring-cache.xsd"&gt;
+ *     &lt;bean id="igniteClient" 
class="org.apache.ignite.IgniteClientSpringBean"&gt;

Review comment:
       Done.




----------------------------------------------------------------
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