icegem-cache-utils/src/main/java/com/googlecode/icegem/cacheutils/replication/GuestNode.java
private void init() {
		try {
			debug("GuestNode#init(): Creating Cache");

			ClientCacheFactory clientCacheFactory = new ClientCacheFactory();

			Properties gemfireProperties = PropertiesHelper.filterProperties(
				System.getProperties(), GEMFIRE_PREFIX);

			for (Object keyObject : gemfireProperties.keySet()) {
				String key = (String) keyObject;
				String value = gemfireProperties.getProperty(key);

				String name = key.substring(GEMFIRE_PREFIX.length());

				debug("GuestNode#init(): Configuring ClientCacheFactory with key = "
					+ name + ", value = " + value);

				clientCacheFactory.set(name, value);
			}

			clientCacheFactory.setPoolSubscriptionEnabled(true);

			String locators = clustersProperties.getProperty(localClusterName);
			String[] locatorsArray = locators.split(",");
			for (String locator : locatorsArray) {
				String locatorHost = locator.substring(0, locator.indexOf("["));

				String locatorPortString = locator.substring(
					locator.indexOf("[") + 1, locator.indexOf("]"));
				int locatorPort = Integer.parseInt(locatorPortString);

				debug("GuestNode#init(): Adding locator to pool: locatorHost = "
					+ locatorHost + ", locatorPort = " + locatorPort);

				clientCacheFactory.addPoolLocator(locatorHost, locatorPort);
			}

			clientCache = clientCacheFactory.create();

			ClientRegionFactory<String, Long> clientRegionFactory = clientCache
				.createClientRegionFactory(ClientRegionShortcut.PROXY);

			region = clientCache.getRegion(regionName);

			debug("GuestNode#init(): Get region with name = " + regionName
				+ ": region = " + region);

			if (region == null) {
				region = clientRegionFactory.create(regionName);
			}
			debug("GuestNode#init(): Create region with name = " + regionName
				+ ": region = " + region);

		} catch (Throwable t) {
			debug(
				"GuestNode#init(): Throwable caught with message = "
					+ t.getMessage(), t);

		}
	}
private void init() {
		try {
			debug("GuestNode#init(): Creating Cache");

			ClientCacheFactory clientCacheFactory = new ClientCacheFactory();

			Properties gemfireProperties = PropertiesHelper.filterProperties(
				System.getProperties(), GEMFIRE_PREFIX);

			for (Object keyObject : gemfireProperties.keySet()) {
				String key = (String) keyObject;
				String value = gemfireProperties.getProperty(key);

				String name = key.substring(GEMFIRE_PREFIX.length());

				debug("GuestNode#init(): Configuring ClientCacheFactory with key = "
					+ name + ", value = " + value);

				clientCacheFactory.set(name, value);
			}

			clientCacheFactory.setPoolSubscriptionEnabled(true);

			String locators = clustersProperties.getProperty(localClusterName);
			String[] locatorsArray = locators.split(",");
			for (String locator : locatorsArray) {
				String locatorHost = locator.substring(0, locator.indexOf("["));

				String locatorPortString = locator.substring(
					locator.indexOf("[") + 1, locator.indexOf("]"));
				int locatorPort = Integer.parseInt(locatorPortString);

				debug("GuestNode#init(): Adding locator to pool: locatorHost = "
					+ locatorHost + ", locatorPort = " + locatorPort);

				clientCacheFactory.addPoolLocator(locatorHost, locatorPort);
			}

			clientCache = clientCacheFactory.create();

			ClientRegionFactory<String, Long> clientRegionFactory = clientCache
				.createClientRegionFactory(ClientRegionShortcut.PROXY);

			region = clientCache.getRegion(regionName);

			debug("GuestNode#init(): Get region with name = " + regionName
				+ ": region = " + region);

			if (region == null) {
				region = clientRegionFactory.create(regionName);
			}
			debug("GuestNode#init(): Create region with name = " + regionName
				+ ": region = " + region);

		} catch (Throwable t) {
			debug(
				"GuestNode#init(): Throwable caught with message = "
					+ t.getMessage(), t);

		}
	}
private void init ( ) { try { debug ( "GuestNode#init(): Creating Cache" ) ; ClientCacheFactory clientCacheFactory = new ClientCacheFactory ( ) ; Properties gemfireProperties = PropertiesHelper . filterProperties ( System . getProperties ( ) , GEMFIRE_PREFIX ) ; for ( Object keyObject : gemfireProperties . keySet ( ) ) { String key = ( String ) keyObject ; String value = gemfireProperties . getProperty ( key ) ; String name = key . substring ( GEMFIRE_PREFIX . length ( ) ) ; debug ( "GuestNode#init(): Configuring ClientCacheFactory with key = " + name + ", value = " + value ) ; clientCacheFactory . set ( name , value ) ; } clientCacheFactory . setPoolSubscriptionEnabled ( true ) ; String locators = clustersProperties . getProperty ( localClusterName ) ; String [ ] locatorsArray = locators . split ( "," ) ; for ( String locator : locatorsArray ) { String locatorHost = locator . substring ( 0 , locator . indexOf ( "[" ) ) ; String locatorPortString = locator . substring ( locator . indexOf ( "[" ) + 1 , locator . indexOf ( "]" ) ) ; int locatorPort = Integer . parseInt ( locatorPortString ) ; debug ( "GuestNode#init(): Adding locator to pool: locatorHost = " + locatorHost + ", locatorPort = " + locatorPort ) ; clientCacheFactory . addPoolLocator ( locatorHost , locatorPort ) ; } clientCache = clientCacheFactory . create ( ) ; ClientRegionFactory < String , Long > clientRegionFactory = clientCache . createClientRegionFactory ( ClientRegionShortcut . PROXY ) ; region = clientCache . getRegion ( regionName ) ; debug ( "GuestNode#init(): Get region with name = " + regionName + ": region = " + region ) ; if ( region == null ) { region = clientRegionFactory . create ( regionName ) ; } debug ( "GuestNode#init(): Create region with name = " + regionName + ": region = " + region ) ; } catch ( Throwable t ) { debug ( "GuestNode#init(): Throwable caught with message = " + t . getMessage ( ) , t ) ; } }
Initializes the technical region
Initializes the technical region