private void startDistributedSystem(FilterConfig config){
  final String cacheType=config.getInitParameter(INIT_PARAM_CACHE_TYPE);
  if (CACHE_TYPE_CLIENT_SERVER.equals(cacheType)) {
    distributedCache=ClientServerCache.getInstance();
  }
 else   if (CACHE_TYPE_PEER_TO_PEER.equals(cacheType)) {
    distributedCache=PeerToPeerCache.getInstance();
  }
 else {
    LOG.error("No 'cache-type' initialization param set. " + "Cache will not be started");
    return;
  }
  if (!distributedCache.isStarted()) {
    for (Enumeration<String> e=config.getInitParameterNames(); e.hasMoreElements(); ) {
      String param=e.nextElement();
      if (!param.startsWith(GEMFIRE_PROPERTY)) {
        continue;
      }
      String gemfireProperty=param.substring(GEMFIRE_PROPERTY.length());
      LOG.info("Setting gemfire property: {} = {}",gemfireProperty,config.getInitParameter(param));
      distributedCache.setProperty(gemfireProperty,config.getInitParameter(param));
    }
    distributedCache.lifecycleEvent(LifecycleTypeAdapter.START);
  }
}

private void startDistributedSystem ( FilterConfig config ) { final String cacheType = config . getInitParameter ( INIT_PARAM_CACHE_TYPE ) ; if ( CACHE_TYPE_CLIENT_SERVER . equals ( cacheType ) ) { distributedCache = ClientServerCache . getInstance ( ) ; } else if ( CACHE_TYPE_PEER_TO_PEER . equals ( cacheType ) ) { distributedCache = PeerToPeerCache . getInstance ( ) ; } else { LOG . error ( "No 'cache-type' initialization param set. " + "Cache will not be started" ) ; return ; } if ( ! distributedCache . isStarted ( ) ) { for ( Enumeration < String > e = config . getInitParameterNames ( ) ; e . hasMoreElements ( ) ; ) { String param = e . nextElement ( ) ; if ( ! param . startsWith ( GEMFIRE_PROPERTY ) ) { continue ; } String gemfireProperty = param . substring ( GEMFIRE_PROPERTY . length ( ) ) ; LOG . info ( "Setting gemfire property: {} = {}" , gemfireProperty , config . getInitParameter ( param ) ) ; distributedCache . setProperty ( gemfireProperty , config . getInitParameter ( param ) ) ; } distributedCache . lifecycleEvent ( LifecycleTypeAdapter . START ) ; } }
start the underlying distributed system
