public CacheSingleton() { try { grid = GridGain.start("example-cache.xml"); } catch (GridException e) { logger.error("Could not create Cache", e); } }
/** {@inheritDoc} */ @SuppressWarnings("IfMayBeConditional") @Override public void afterPropertiesSet() throws Exception { assert grid == null; 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 GridGain node inside of " + "GridSpringCacheManager. If you already have a node running, omit both of them and set" + "'gridName' property."); } if (cfgPath != null) grid = (GridEx)GridGain.start(cfgPath); else if (cfg != null) grid = (GridEx)GridGain.start(cfg); else grid = (GridEx)GridGain.grid(gridName); }
grids.add(GridGain.start(cfg0));