You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ni...@apache.org on 2019/04/09 13:25:22 UTC
[ignite] 01/03: IGNITE-9113: Revert unnecessary static import.
This is an automated email from the ASF dual-hosted git repository.
nizhikov pushed a commit to branch IGNITE-9113
in repository https://gitbox.apache.org/repos/asf/ignite.git
commit d01ea79e22726f1f07e1505c54a1586edfee70d8
Author: Nikolay Izhikov <ni...@apache.org>
AuthorDate: Tue Apr 9 16:12:16 2019 +0300
IGNITE-9113: Revert unnecessary static import.
---
.../processors/cache/GridCacheProcessor.java | 24 ++++++++++------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 85aa6d8..6a3e74b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -203,8 +203,6 @@ import static org.apache.ignite.internal.GridComponent.DiscoveryDataExchangeType
import static org.apache.ignite.internal.IgniteComponentType.JTA;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_CONSISTENCY_CHECK_SKIPPED;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_TX_CONFIG;
-import static org.apache.ignite.internal.processors.cache.CacheType.USER;
-import static org.apache.ignite.internal.processors.cache.GridCacheUtils.affinityNode;
import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isNearEnabled;
import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isPersistentCache;
import static org.apache.ignite.internal.util.IgniteUtils.doInParallel;
@@ -875,7 +873,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cacheData.sql(sql);
if (GridCacheUtils.isCacheTemplateName(cacheName))
- templates.put(cacheName, new CacheInfo(cacheData, USER, false, 0, true));
+ templates.put(cacheName, new CacheInfo(cacheData, CacheType.USER, false, 0, true));
else {
if (caches.containsKey(cacheName)) {
throw new IgniteCheckedException("Duplicate cache name found (check configuration and " +
@@ -884,7 +882,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
CacheType cacheType = cacheType(cacheName);
- if (cacheType != USER && cfg.getDataRegionName() == null)
+ if (cacheType != CacheType.USER && cfg.getDataRegionName() == null)
cfg.setDataRegionName(sharedCtx.database().systemDateRegionName());
addStoredCache(caches, cacheData, cacheName, cacheType, true);
@@ -958,7 +956,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
if (!keepStaticCacheConfiguration) {
addStoredCache(caches, storedCacheData, cacheName, type, false);
- if (type == USER)
+ if (type == CacheType.USER)
skippedConfigs.add(cacheName);
}
}
@@ -2119,7 +2117,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
* @return {@code true} if local node is affinity node for cache.
*/
private boolean isLocalAffinity(CacheConfiguration cacheConfiguration) {
- return affinityNode(ctx.discovery().localNode(), cacheConfiguration.getNodeFilter());
+ return CU.affinityNode(ctx.discovery().localNode(), cacheConfiguration.getNodeFilter());
}
/**
@@ -2782,7 +2780,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
DataRegion dataRegion = sharedCtx.database().dataRegion(memPlcName);
boolean needToStart = (dataRegion != null) && (
- cacheType != USER || (sharedCtx.isLazyMemoryAllocation(dataRegion) &&
+ cacheType != CacheType.USER || (sharedCtx.isLazyMemoryAllocation(dataRegion) &&
(!cacheObjCtx.kernalContext().clientNode() || cfg.getCacheMode() == LOCAL)));
if (needToStart)
@@ -3386,7 +3384,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
if (secCtxBytes != null) {
SecurityContext secCtx = U.unmarshal(marsh, secCtxBytes, U.resolveClassLoader(ctx.config()));
- if (secCtx != null && cacheInfo.cacheType() == USER)
+ if (secCtx != null && cacheInfo.cacheType() == CacheType.USER)
authorizeCacheCreate(cacheInfo.cacheData().config(), secCtx);
}
}
@@ -3784,7 +3782,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
return dynamicStartCache(ccfg,
cacheName,
nearCfg,
- USER,
+ CacheType.USER,
false,
failIfExists,
failIfNotStarted,
@@ -3804,7 +3802,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
return dynamicStartCache(ccfg,
ccfg.getName(),
ccfg.getNearConfiguration(),
- USER,
+ CacheType.USER,
true,
false,
true,
@@ -4068,7 +4066,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
else if (DataStructuresProcessor.isDataStructureCache(ccfg.getName()))
return CacheType.DATA_STRUCTURES;
else
- return USER;
+ return CacheType.USER;
}
/**
@@ -4267,7 +4265,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
else if (DataStructuresProcessor.isDataStructureCache(cacheName))
return CacheType.DATA_STRUCTURES;
else
- return USER;
+ return CacheType.USER;
}
/**
@@ -4395,7 +4393,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
*/
private void authorizeCacheChange(DynamicCacheChangeRequest req) {
// Null security context means authorize this node.
- if (req.cacheType() == null || req.cacheType() == USER) {
+ if (req.cacheType() == null || req.cacheType() == CacheType.USER) {
if (req.stop())
ctx.security().authorize(null, SecurityPermission.CACHE_DESTROY, null);
else