@Override public void start(SessionFactoryOptions settings, Properties properties) throws CacheException { Logger.LOGGER.deprecatedRegionFactory(this.getClass().getName(), this.getClass().getSuperclass().getSuperclass().getName(), SHARED, this.shared); properties.setProperty(SHARED, this.shared); super.start(settings, properties); } }
@Override public CollectionRegion buildCollectionRegion(String regionName, Properties properties, CacheDataDescription metadata) { if ( log.isDebugEnabled() ) { log.debug( "Building collection cache region [" + regionName + "]" ); } final AdvancedCache cache = getCache( regionName, DataType.COLLECTION, metadata); final CollectionRegion region = new CollectionRegionImpl(cache, regionName, transactionManager, metadata, this, getCacheKeysFactory()); startRegion((BaseRegion) region); return region; }
public void start(SessionFactoryOptions settings, Properties properties) throws CacheException { cacheManagerName = properties.getProperty(DualNodeTest.NODE_ID_PROP); EmbeddedCacheManager existing = ClusterAware.getCacheManager(cacheManagerName); locallyAdded = (existing == null); if (locallyAdded) { delegate.start(settings, properties); ClusterAware.addCacheManager(cacheManagerName, delegate.getCacheManager()); } else { delegate.setCacheManager(existing); } }
@Override public QueryResultsRegion buildQueryResultsRegion(String regionName, Properties properties) { if ( log.isDebugEnabled() ) { log.debug( "Building query results cache region [" + regionName + "]" ); } final AdvancedCache cache = getCache( regionName, DataType.QUERY, null); final QueryResultsRegion region = new QueryResultsRegionImpl(cache, regionName, transactionManager, this); startRegion((BaseRegion) region); return region; }
@Override public long nextTimestamp() { return factory.nextTimestamp(); }
@Override public Configuration getPendingPutsCacheConfiguration() { return delegate.getPendingPutsCacheConfiguration(); }
@Override protected AdvancedCache getCache(String regionName, DataType type, CacheDataDescription metadata) { AdvancedCache cache = super.getCache(regionName, type, metadata); return wrapCache == null ? cache : wrapCache.apply(cache); }
@Override public InfinispanBaseRegion buildTimestampsRegion(String regionName) { String prefix = delegate.getSettings().getCacheRegionPrefix(); if (prefix != null && !prefix.isEmpty()) regionName = prefix + '.' + regionName; return (InfinispanBaseRegion) delegate.buildTimestampsRegion(regionName, null); }
@Override public InfinispanBaseRegion buildQueryResultsRegion(String regionName) { String prefix = delegate.getSettings().getCacheRegionPrefix(); if (prefix != null && !prefix.isEmpty()) regionName = prefix + '.' + regionName; return (InfinispanBaseRegion) delegate.buildQueryResultsRegion(regionName, null); }
@Override public InfinispanBaseRegion buildCollectionRegion(String regionName, AccessType accessType) { String prefix = delegate.getSettings().getCacheRegionPrefix(); if (prefix != null && !prefix.isEmpty()) regionName = prefix + '.' + regionName; return (InfinispanBaseRegion) delegate.buildCollectionRegion(regionName, null, MUTABLE_VERSIONED); }
@Override public InfinispanBaseRegion buildEntityRegion(String regionName, AccessType accessType) { String prefix = delegate.getSettings().getCacheRegionPrefix(); if (prefix != null && !prefix.isEmpty()) regionName = prefix + '.' + regionName; return (InfinispanBaseRegion) delegate.buildEntityRegion(regionName, null, MUTABLE_VERSIONED); }
public QueryResultsRegion buildQueryResultsRegion(String regionName, Properties properties) throws CacheException { return delegate.buildQueryResultsRegion(regionName, properties); }
public EntityRegion buildEntityRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException { return delegate.buildEntityRegion(regionName, properties, metadata); }
public NaturalIdRegion buildNaturalIdRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException { return delegate.buildNaturalIdRegion( regionName, properties, metadata ); }
public CollectionRegion buildCollectionRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException { return delegate.buildCollectionRegion(regionName, properties, metadata); }
public TimestampsRegion buildTimestampsRegion(String regionName, Properties properties) throws CacheException { return delegate.buildTimestampsRegion(regionName, properties); }
@Override public NaturalIdRegion buildNaturalIdRegion(String regionName, Properties properties, CacheDataDescription metadata) { if ( log.isDebugEnabled() ) { log.debug("Building natural id cache region [" + regionName + "]"); } final AdvancedCache cache = getCache( regionName, DataType.NATURAL_ID, metadata); NaturalIdRegion region = new NaturalIdRegionImpl(cache, regionName, transactionManager, metadata, this, getCacheKeysFactory()); startRegion((BaseRegion) region); return region; }
@Override public TimestampsRegion buildTimestampsRegion(String regionName, Properties properties) { if ( log.isDebugEnabled() ) { log.debug( "Building timestamps cache region [" + regionName + "]" ); } final AdvancedCache cache = getCache( regionName, DataType.TIMESTAMPS, null); TimestampsRegion region; if ( Caches.isClustered(cache) ) { region = new ClusteredTimestampsRegionImpl(cache, regionName, this); } else { region = new TimestampsRegionImpl(cache, regionName, this); } startRegion((BaseRegion) region); return region; }
@Override public long nextTimestamp() { return delegate.nextTimestamp(); } }
private void prepareForValidation() { if (strategy != null) { assert strategy == Strategy.VALIDATION; return; } // If two regions share the same name, they should use the same cache. // Using same cache means they should use the same put validator. // Besides, any cache interceptor initialization should only be done once. // Synchronizes on the cache instance since it's shared between regions with same name. synchronized (cache) { PutFromLoadValidator found = findValidator(cache); validator = found != null ? found : new PutFromLoadValidator(cache, factory, factory.getPendingPutsCacheConfiguration()); strategy = Strategy.VALIDATION; } }