You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/09/09 15:41:34 UTC
[27/50] ignite git commit: ignite-1349 Use cache proxy in
IgfsDataManager for tx thread-local context cleanup.
ignite-1349 Use cache proxy in IgfsDataManager for tx thread-local context cleanup.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9f59c3f5
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9f59c3f5
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9f59c3f5
Branch: refs/heads/ignite-1093-2
Commit: 9f59c3f5e6503205525f7507c6d1e82f9de7b6c9
Parents: 2198381
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 8 17:26:52 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 8 17:26:52 2015 +0300
----------------------------------------------------------------------
.../internal/processors/igfs/IgfsDataManager.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9f59c3f5/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
index c571f41..b1b51f9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
@@ -68,7 +68,6 @@ import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
import org.apache.ignite.internal.managers.communication.GridMessageListener;
import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
-import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.datastreamer.DataStreamerCacheUpdaters;
@@ -239,16 +238,15 @@ public class IgfsDataManager extends IgfsManager {
}
/** {@inheritDoc} */
+ @SuppressWarnings("unchecked")
@Override protected void onKernalStart0() throws IgniteCheckedException {
- igfsCtx.kernalContext().cache().getOrStartCache(igfsCtx.configuration().getDataCacheName());
- dataCachePrj = igfsCtx.kernalContext().cache().internalCache(igfsCtx.configuration().getDataCacheName());
+ dataCachePrj = igfsCtx.kernalContext().cache().getOrStartCache(igfsCtx.configuration().getDataCacheName());
- igfsCtx.kernalContext().cache().getOrStartCache(igfsCtx.configuration().getDataCacheName());
- dataCache = igfsCtx.kernalContext().cache().internalCache(igfsCtx.configuration().getDataCacheName());
+ assert dataCachePrj != null;
- metrics = igfsCtx.igfs().localMetrics();
+ dataCache = (IgniteInternalCache)dataCachePrj;
- assert dataCachePrj != null;
+ metrics = igfsCtx.igfs().localMetrics();
AffinityKeyMapper mapper = igfsCtx.kernalContext().cache()
.internalCache(igfsCtx.configuration().getDataCacheName()).configuration().getAffinityMapper();
@@ -312,7 +310,7 @@ public class IgfsDataManager extends IgfsManager {
*/
public IgniteUuid nextAffinityKey(@Nullable IgniteUuid prevAffKey) {
// Do not generate affinity key for non-affinity nodes.
- if (!((GridCacheAdapter)dataCache).context().affinityNode())
+ if (!dataCache.context().affinityNode())
return null;
UUID nodeId = igfsCtx.kernalContext().localNodeId();