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 9B96018CB0 for ; Thu, 16 Jul 2015 06:02:05 +0000 (UTC) Received: (qmail 20302 invoked by uid 500); 16 Jul 2015 06:01:56 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 20270 invoked by uid 500); 16 Jul 2015 06:01:56 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 20261 invoked by uid 99); 16 Jul 2015 06:01:56 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2015 06:01:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id AC6081A7138 for ; Thu, 16 Jul 2015 06:01:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.791 X-Spam-Level: * X-Spam-Status: No, score=1.791 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id hAapoTJ6IccW for ; Thu, 16 Jul 2015 06:01:40 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 2E26325077 for ; Thu, 16 Jul 2015 06:01:35 +0000 (UTC) Received: (qmail 17822 invoked by uid 99); 16 Jul 2015 06:01:35 -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; Thu, 16 Jul 2015 06:01:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 978DEE36E4; Thu, 16 Jul 2015 06:01:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.incubator.apache.org Date: Thu, 16 Jul 2015 06:01:43 -0000 Message-Id: In-Reply-To: <334d6c025ee7436f9c57f0305b3c8d7d@git.apache.org> References: <334d6c025ee7436f9c57f0305b3c8d7d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/13] incubator-ignite git commit: Minor fixes in Spring Caching Minor fixes in Spring Caching Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d38a70d2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d38a70d2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d38a70d2 Branch: refs/heads/ignite-1108 Commit: d38a70d2c12c640624c70bd0cb5634bb65b6d041 Parents: de7e06f Author: Valentin Kulichenko Authored: Wed Jul 15 20:04:45 2015 -0700 Committer: Valentin Kulichenko Committed: Wed Jul 15 20:04:45 2015 -0700 ---------------------------------------------------------------------- .../apache/ignite/cache/spring/SpringCache.java | 2 +- .../ignite/cache/spring/SpringCacheManager.java | 22 +++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d38a70d2/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCache.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCache.java b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCache.java index 7651fbe..08aa38b 100644 --- a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCache.java +++ b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCache.java @@ -48,7 +48,7 @@ class SpringCache implements Cache { } /** {@inheritDoc} */ - @Override public Cache.ValueWrapper get(Object key) { + @Override public ValueWrapper get(Object key) { Object val = cache.get(key); return val != null ? new SimpleValueWrapper(val) : null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d38a70d2/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java index afadaee..260026e 100644 --- a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java +++ b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java @@ -41,15 +41,17 @@ import java.util.concurrent.*; * you will need to do the following: *
    *
  • - * Start a Ignite node with configured cache in the same JVM - * where you application is running. + * Start an Ignite node with proper configuration in embedded mode + * (i.e., in the same JVM where the application is running). It can + * already have predefined caches, but it's not required - caches + * will be created automatically on first access if needed. *
  • *
  • - * Configure {@code GridSpringCacheManager} as a cache provider - * in Spring application context. + * Configure {@code SpringCacheManager} as a cache provider + * in the Spring application context. *
  • *
- * {@code GridSpringCacheManager} can start a node itself on its startup + * {@code SpringCacheManager} can start a node itself on its startup * based on provided Ignite configuration. You can provide path to a * Spring configuration XML file, like below (path can be absolute or * relative to {@code IGNITE_HOME}): @@ -61,9 +63,9 @@ import java.util.concurrent.*; * 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"> * <-- Provide configuration file path. --> - * <bean id="cacheManager" class="org.apache.ignite.cache.spring.GridSpringCacheManager"> + * <bean id="cacheManager" class="org.apache.ignite.cache.spring.SpringCacheManager"> * <property name="configurationPath" value="examples/config/spring-cache.xml"/> - * </bean> + * </bean> * * <-- Use annotation-driven caching configuration. --> * <cache:annotation-driven/> @@ -78,7 +80,7 @@ import java.util.concurrent.*; * 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"> * <-- Provide configuration bean. --> - * <bean id="cacheManager" class="org.apache.ignite.cache.spring.GridSpringCacheManager"> + * <bean id="cacheManager" class="org.apache.ignite.cache.spring.SpringCacheManager"> * <property name="configuration"> * <bean id="gridCfg" class="org.apache.ignite.configuration.IgniteConfiguration"> * ... @@ -104,7 +106,7 @@ import java.util.concurrent.*; * 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"> * <-- Provide Grid name. --> - * <bean id="cacheManager" class="org.apache.ignite.cache.spring.GridSpringCacheManager"> + * <bean id="cacheManager" class="org.apache.ignite.cache.spring.SpringCacheManager"> * <property name="gridName" value="myGrid"/> * </bean> * @@ -247,7 +249,7 @@ public class SpringCacheManager implements CacheManager, InitializingBean { if (cfgPath != null && cfg != null) { throw new IllegalArgumentException("Both 'configurationPath' and 'configuration' are " + "provided. Set only one of these properties if you need to start a Ignite node inside of " + - "GridSpringCacheManager. If you already have a node running, omit both of them and set" + + "SpringCacheManager. If you already have a node running, omit both of them and set" + "'gridName' property."); }