IGNITE-891 - Cache store improvements
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2c28381e Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2c28381e Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2c28381e Branch: refs/heads/ignite-sprint-5 Commit: 2c28381ea9156f04e916e3fc616a928ef9686882 Parents: 9acbbca Author: Valentin Kulichenko <vkuliche...@gridgain.com> Authored: Wed May 20 16:56:28 2015 -0700 Committer: Valentin Kulichenko <vkuliche...@gridgain.com> Committed: Wed May 20 16:56:28 2015 -0700 ---------------------------------------------------------------------- .../cache/store/GridCacheStoreManagerAdapter.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2c28381e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java index 0eaa0cb..a4a4212 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java @@ -77,14 +77,6 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt GridKernalContext ctx = igniteContext(); CacheConfiguration cfg = cacheConfiguration(); - if (cfgStore != null && !cfg.isWriteThrough() && !cfg.isReadThrough()) { - U.quietAndWarn(log, - "Persistence store is configured, but both read-through and write-through are disabled. This " + - "configuration makes sense if the store implements loadCache method only. If this is the " + - "case, ignore this warning. Otherwise, fix the configuration for cache: " + cfg.getName(), - "Persistence store is configured, but both read-through and write-through are disabled."); - } - writeThrough = cfg.isWriteThrough(); this.cfgStore = cfgStore; @@ -198,6 +190,16 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt throw new IgniteCheckedException("Failed to start cache store: " + e, e); } } + + CacheConfiguration cfg = cctx.config(); + + if (cfgStore != null && !cfg.isWriteThrough() && !cfg.isReadThrough()) { + U.quietAndWarn(log, + "Persistence store is configured, but both read-through and write-through are disabled. This " + + "configuration makes sense if the store implements loadCache method only. If this is the " + + "case, ignore this warning. Otherwise, fix the configuration for cache: " + cfg.getName(), + "Persistence store is configured, but both read-through and write-through are disabled."); + } } /** {@inheritDoc} */