public void handleCacheRemoval(Cache cache) throws ManagementException {
  if (!isServiceInitialised("handleCacheRemoval")) {
    return;
  }
  this.serviceInitialised=false;
  try {
    cleanUpMonitors();
    cleanBridgeResources();
  }
 catch (  Exception e) {
    if (logger.isDebugEnabled()) {
      logger.debug(e.getMessage(),e);
    }
  }
  try {
    service.close();
  }
 catch (  Exception e) {
    logger.warn(e.getMessage(),e);
  }
 finally {
    this.cacheImpl=null;
    this.service=null;
    this.memberMBeanBridge=null;
    this.memberBean=null;
    this.memberLevelNotifEmitter=null;
  }
}

public void handleCacheRemoval ( Cache cache ) throws ManagementException { if ( ! isServiceInitialised ( "handleCacheRemoval" ) ) { return ; } this . serviceInitialised = false ; try { cleanUpMonitors ( ) ; cleanBridgeResources ( ) ; } catch ( Exception e ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( e . getMessage ( ) , e ) ; } } try { service . close ( ) ; } catch ( Exception e ) { logger . warn ( e . getMessage ( ) , e ) ; } finally { this . cacheImpl = null ; this . service = null ; this . memberMBeanBridge = null ; this . memberBean = null ; this . memberLevelNotifEmitter = null ; } }
handles cache removal . it will automatically remove all mbeans from gemfire domain
