/** * Create cache region. *<p> * @param props * @param regName * @param value * @return CompositeCache */ protected <K, V> CompositeCache<K, V> parseRegion( Properties props, String regName, String value ) { return parseRegion( props, regName, value, null, REGION_PREFIX ); }
/** * Create cache region. *<p> * @param props Configuration properties * @param ccm Cache hub * @param regName Name of the cache region * @param auxiliaries Comma separated list of auxiliaries * * @return CompositeCache */ protected <K, V> CompositeCache<K, V> parseRegion( Properties props, CompositeCacheManager ccm, String regName, String auxiliaries ) { return parseRegion( props, ccm, regName, auxiliaries, null, REGION_PREFIX ); }
/** * Get all the properties for a region and configure its cache. * <p> * This method tells the other parse method the name of the region prefix. *<p> * @param props Configuration properties * @param ccm Cache hub * @param regName Name of the cache region * @param auxiliaries Comma separated list of auxiliaries * @param cca Cache configuration * * @return CompositeCache */ protected <K, V> CompositeCache<K, V> parseRegion( Properties props, CompositeCacheManager ccm, String regName, String auxiliaries, ICompositeCacheAttributes cca ) { return parseRegion( props, ccm, regName, auxiliaries, cca, REGION_PREFIX ); }
/** * Get all the properties for a region and configure its cache. * <p> * This method tells the other parse method the name of the region prefix. *<p> * @param props * @param regName * @param value * @param cca * @return CompositeCache */ protected <K, V> CompositeCache<K, V> parseRegion( Properties props, String regName, String value, ICompositeCacheAttributes cca ) { return parseRegion( props, regName, value, cca, REGION_PREFIX ); }
/** * Create caches used internally. System status gives them creation priority. *<p> * @param props */ protected <K, V> void parseSystemRegions( Properties props ) { Enumeration<?> en = props.propertyNames(); while ( en.hasMoreElements() ) { String key = (String) en.nextElement(); if ( key.startsWith( SYSTEM_REGION_PREFIX ) && key.indexOf( "attributes" ) == -1 ) { String regionName = key.substring( SYSTEM_REGION_PREFIX.length() ); String value = OptionConverter.findAndSubst( key, props ); ICache<K, V> cache; synchronized ( regionName ) { cache = parseRegion( props, regionName, value, null, SYSTEM_REGION_PREFIX ); } compositeCacheManager.addCache( regionName, cache ); } } }
/** * Create caches used internally. System status gives them creation priority. *<p> * @param props Configuration properties * @param ccm Cache hub */ protected void parseSystemRegions( Properties props, CompositeCacheManager ccm ) { for (String key : props.stringPropertyNames() ) { if ( key.startsWith( SYSTEM_REGION_PREFIX ) && key.indexOf( "attributes" ) == -1 ) { String regionName = key.substring( SYSTEM_REGION_PREFIX.length() ); String auxiliaries = OptionConverter.findAndSubst( key, props ); ICache<?, ?> cache; synchronized ( regionName ) { cache = parseRegion( props, ccm, regionName, auxiliaries, null, SYSTEM_REGION_PREFIX ); } ccm.addCache( regionName, cache ); } } }
/** * Parse region elements. *<p> * @param props */ protected <K, V> void parseRegions( Properties props ) { List<String> regionNames = new ArrayList<String>(); Enumeration<?> en = props.propertyNames(); while ( en.hasMoreElements() ) { String key = (String) en.nextElement(); if ( key.startsWith( REGION_PREFIX ) && key.indexOf( "attributes" ) == -1 ) { String regionName = key.substring( REGION_PREFIX.length() ); regionNames.add( regionName ); String auxiliaryList = OptionConverter.findAndSubst( key, props ); ICache<K, V> cache; synchronized ( regionName ) { cache = parseRegion( props, regionName, auxiliaryList ); } compositeCacheManager.addCache( regionName, cache ); } } if ( log.isInfoEnabled() ) { log.info( "Parsed regions " + regionNames ); } }
/** * Parse region elements. *<p> * @param props Configuration properties * @param ccm Cache hub */ protected void parseRegions( Properties props, CompositeCacheManager ccm ) { List<String> regionNames = new ArrayList<String>(); for (String key : props.stringPropertyNames() ) { if ( key.startsWith( REGION_PREFIX ) && key.indexOf( "attributes" ) == -1 ) { String regionName = key.substring( REGION_PREFIX.length() ); regionNames.add( regionName ); String auxiliaries = OptionConverter.findAndSubst( key, props ); ICache<?, ?> cache; synchronized ( regionName ) { cache = parseRegion( props, ccm, regionName, auxiliaries ); } ccm.addCache( regionName, cache ); } } if ( log.isInfoEnabled() ) { log.info( "Parsed regions " + regionNames ); } }
cache = configurator.parseRegion( this.getConfigurationProperties(), this, cattr.getCacheName(), this.defaultAuxValues, cattr );
cache = configurator.parseRegion( this.getConfigurationProperties(), cattr.getCacheName(), this.defaultAuxValues, cattr );