/** {@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); }