/** {@inheritDoc} */ @Override public <C extends Configuration<K, V>> C getConfiguration(Class<C> clazz) { return delegate.getConfiguration(clazz); }
/** {@inheritDoc} */ @Override protected Map<String, VisorCacheConfiguration> run(VisorCacheConfigurationCollectorTaskArg arg) { Collection<IgniteCacheProxy<?, ?>> caches = ignite.context().cache().jcaches(); Pattern ptrn = arg.getRegex() != null ? Pattern.compile(arg.getRegex()) : null; boolean all = F.isEmpty(arg.getCacheNames()); boolean hasPtrn = ptrn != null; Map<String, VisorCacheConfiguration> res = U.newHashMap(caches.size()); for (IgniteCacheProxy<?, ?> cache : caches) { String cacheName = cache.getName(); boolean matched = hasPtrn ? ptrn.matcher(cacheName).find() : all || arg.getCacheNames().contains(cacheName); if (!VisorTaskUtils.isRestartingCache(ignite, cacheName) && matched) { VisorCacheConfiguration cfg = config(cache.getConfiguration(CacheConfiguration.class), cache.context().dynamicDeploymentId()); res.put(cacheName, cfg); } } return res; }
assertEquals(publicCache.getConfiguration(CacheConfiguration.class).getCacheMode(), cacheMode);
/** {@inheritDoc} */ @Override public <C extends Configuration<K, V>> C getConfiguration(Class<C> clazz) { return delegate.getConfiguration(clazz); }
/** {@inheritDoc} */ @Override protected Map<String, VisorCacheConfiguration> run(VisorCacheConfigurationCollectorTaskArg arg) { Collection<IgniteCacheProxy<?, ?>> caches = ignite.context().cache().jcaches(); Collection<String> cacheNames = arg.getCacheNames(); boolean all = F.isEmpty(cacheNames); Map<String, VisorCacheConfiguration> res = U.newHashMap(all ? caches.size() : cacheNames.size()); for (IgniteCacheProxy<?, ?> cache : caches) { String cacheName = cache.getName(); if (all || cacheNames.contains(cacheName)) { res.put(cacheName, config(cache.getConfiguration(CacheConfiguration.class), cache.context().dynamicDeploymentId())); } } return res; }