public CacheCreateConfigOperation(CacheConfig config, boolean createAlsoOnOthers, boolean ignoreLocal) { super(config.getNameWithPrefix()); this.config = config; this.createAlsoOnOthers = createAlsoOnOthers; this.ignoreLocal = ignoreLocal; }
public CacheCreateConfigOperation(CacheConfig config, boolean createAlsoOnOthers, boolean ignoreLocal) { super(config.getNameWithPrefix()); this.config = config; this.createAlsoOnOthers = createAlsoOnOthers; this.ignoreLocal = ignoreLocal; }
@Override protected String getDistributedObjectName() { return cacheConfig.getNameWithPrefix(); }
@Override protected String getDistributedObjectName() { return cacheConfig.getNameWithPrefix(); }
protected void destroySegments(CacheConfig cacheConfig) { String name = cacheConfig.getNameWithPrefix(); for (CachePartitionSegment segment : segments) { segment.deleteRecordStore(name, true); } }
protected void destroySegments(CacheConfig cacheConfig) { String name = cacheConfig.getNameWithPrefix(); for (CachePartitionSegment segment : segments) { segment.deleteRecordStore(name, true); } }
@SuppressFBWarnings("RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED") @Override protected <K, V> void addCacheConfigIfAbsent(CacheConfig<K, V> cacheConfig) { clientCacheProxyFactory.addCacheConfig(cacheConfig.getNameWithPrefix(), cacheConfig); }
@SuppressFBWarnings("RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED") @Override protected <K, V> void addCacheConfigIfAbsent(CacheConfig<K, V> cacheConfig) { clientCacheProxyFactory.addCacheConfig(cacheConfig.getNameWithPrefix(), cacheConfig); }
@Override public CacheStatistics getLocalCacheStatistics() { // TODO: throw UnsupportedOperationException if cache statistics are not enabled (but it breaks backward compatibility) return getService().createCacheStatIfAbsent(cacheConfig.getNameWithPrefix()); }
private int handleCache(MemberStateImpl memberState, int count, CacheConfig config, CacheStatistics cacheStatistics) { memberState.putLocalCacheStats(config.getNameWithPrefix(), new LocalCacheStatsImpl(cacheStatistics)); return ++count; }
@Override public CacheStatistics getLocalCacheStatistics() { // TODO: throw UnsupportedOperationException if cache statistics are not enabled (but it breaks backward compatibility) return getService().createCacheStatIfAbsent(cacheConfig.getNameWithPrefix()); }
private int handleCache(MemberStateImpl memberState, int count, CacheConfig config, CacheStatistics cacheStatistics) { memberState.putLocalCacheStats(config.getNameWithPrefix(), new LocalCacheStatsImpl(cacheStatistics)); return ++count; }
@Override protected <K, V> ICacheInternal<K, V> createCacheProxy(CacheConfig<K, V> cacheConfig) { clientCacheProxyFactory.addCacheConfig(cacheConfig.getNameWithPrefix(), cacheConfig); try { ClientICacheManager cacheManager = client.getCacheManager(); String nameWithPrefix = cacheConfig.getNameWithPrefix(); ICacheInternal<K, V> cache = (ICacheInternal<K, V>) cacheManager.getCacheByFullName(nameWithPrefix); cache.setCacheManager(this); return cache; } catch (Throwable t) { clientCacheProxyFactory.removeCacheConfig(cacheConfig.getNameWithPrefix()); throw rethrow(t); } }
@Override protected <K, V> ICacheInternal<K, V> createCacheProxy(CacheConfig<K, V> cacheConfig) { clientCacheProxyFactory.addCacheConfig(cacheConfig.getNameWithPrefix(), cacheConfig); try { ClientICacheManager cacheManager = client.getCacheManager(); String nameWithPrefix = cacheConfig.getNameWithPrefix(); ICacheInternal<K, V> cache = (ICacheInternal<K, V>) cacheManager.getCacheByFullName(nameWithPrefix); cache.setCacheManager(this); return cache; } catch (Throwable t) { clientCacheProxyFactory.removeCacheConfig(cacheConfig.getNameWithPrefix()); throw rethrow(t); } }
protected AbstractClientCacheProxyBase(CacheConfig<K, V> cacheConfig, ClientContext context) { super(ICacheService.SERVICE_NAME, cacheConfig.getName(), context); this.name = cacheConfig.getName(); this.nameWithPrefix = cacheConfig.getNameWithPrefix(); this.cacheConfig = cacheConfig; this.statisticsEnabled = cacheConfig.isStatisticsEnabled(); }
@Override protected <K, V> ICacheInternal<K, V> createCacheProxy(CacheConfig<K, V> cacheConfig) { HazelcastInstanceCacheManager cacheManager = instance.getCacheManager(); CacheProxy<K, V> cacheProxy = (CacheProxy<K, V>) cacheManager.getCacheByFullName(cacheConfig.getNameWithPrefix()); cacheProxy.setCacheManager(this); return cacheProxy; }
@Override protected <K, V> ICacheInternal<K, V> createCacheProxy(CacheConfig<K, V> cacheConfig) { HazelcastInstanceCacheManager cacheManager = instance.getCacheManager(); CacheProxy<K, V> cacheProxy = (CacheProxy<K, V>) cacheManager.getCacheByFullName(cacheConfig.getNameWithPrefix()); cacheProxy.setCacheManager(this); return cacheProxy; }
protected AbstractClientCacheProxyBase(CacheConfig<K, V> cacheConfig, ClientContext context) { super(ICacheService.SERVICE_NAME, cacheConfig.getName(), context); this.name = cacheConfig.getName(); this.nameWithPrefix = cacheConfig.getNameWithPrefix(); this.cacheConfig = cacheConfig; this.statisticsEnabled = cacheConfig.isStatisticsEnabled(); }
AbstractCacheProxyBase(CacheConfig<K, V> cacheConfig, NodeEngine nodeEngine, ICacheService cacheService) { super(nodeEngine, cacheService); this.name = cacheConfig.getName(); this.nameWithPrefix = cacheConfig.getNameWithPrefix(); this.cacheConfig = cacheConfig; this.nodeEngine = nodeEngine; this.logger = nodeEngine.getLogger(getClass()); this.partitionService = nodeEngine.getPartitionService(); this.cacheService = cacheService; this.serializationService = nodeEngine.getSerializationService(); this.operationProvider = cacheService.getCacheOperationProvider(nameWithPrefix, cacheConfig.getInMemoryFormat()); }
AbstractCacheProxyBase(CacheConfig<K, V> cacheConfig, NodeEngine nodeEngine, ICacheService cacheService) { super(nodeEngine, cacheService); this.name = cacheConfig.getName(); this.nameWithPrefix = cacheConfig.getNameWithPrefix(); this.cacheConfig = cacheConfig; this.nodeEngine = nodeEngine; this.logger = nodeEngine.getLogger(getClass()); this.partitionService = nodeEngine.getPartitionService(); this.cacheService = cacheService; this.serializationService = nodeEngine.getSerializationService(); this.operationProvider = cacheService.getCacheOperationProvider(nameWithPrefix, cacheConfig.getInMemoryFormat()); }