@SuppressWarnings("unchecked") public void addCacheContext(GridCacheContext cacheCtx) throws IgniteCheckedException {
  if (ctxMap.containsKey(cacheCtx.cacheId())) {
    GridCacheContext<K,V> existing=ctxMap.get(cacheCtx.cacheId());
    throw new IgniteCheckedException("Failed to start cache due to conflicting cache ID " + "(change cache name and restart grid) [cacheName=" + cacheCtx.name() + ", conflictingCacheName="+ existing.name()+ ']');
  }
  CacheStoreManager mgr=cacheCtx.store();
  if (mgr.configured() && mgr.isLocal())   locStoreCnt.incrementAndGet();
  ctxMap.put(cacheCtx.cacheId(),cacheCtx);
}

@ SuppressWarnings ( "unchecked" ) public void addCacheContext ( GridCacheContext cacheCtx ) throws IgniteCheckedException { if ( ctxMap . containsKey ( cacheCtx . cacheId ( ) ) ) { GridCacheContext < K , V > existing = ctxMap . get ( cacheCtx . cacheId ( ) ) ; throw new IgniteCheckedException ( "Failed to start cache due to conflicting cache ID " + "(change cache name and restart grid) [cacheName=" + cacheCtx . name ( ) + ", conflictingCacheName=" + existing . name ( ) + ']' ) ; } CacheStoreManager mgr = cacheCtx . store ( ) ; if ( mgr . configured ( ) && mgr . isLocal ( ) ) locStoreCnt . incrementAndGet ( ) ; ctxMap . put ( cacheCtx . cacheId ( ) , cacheCtx ) ; }
adds cache context to shared cache context .
