Package org.apache.helix.model

Examples of org.apache.helix.model.Alerts


  public void persistAlerts()
  {
    //XXX: Am I using _accessor too directly here?
   
    Alerts alerts = _accessor.getProperty(_keyBuilder.alerts());
    if (alerts == null) {
      alerts = new Alerts(Alerts.nodeName); //TODO: fix naming of this record, if it matters
    }
    alerts.getRecord().setMapFields(_alertsMap);
     boolean retVal = _accessor.setProperty(_keyBuilder.alerts(), alerts);
     logger.debug("persistAlerts retVal: "+retVal);
  }
View Full Code Here


  }

  public void updateCache(HealthDataCache cache)
  {
    _cache = cache;
    Alerts alertsRecord = _cache.getAlerts();
    if (alertsRecord != null)
    {
      _alertsMap = alertsRecord.getMapFields();
    }
    else
    {
      _alertsMap = new HashMap<String, Map<String,String>>();
    }
View Full Code Here

  }

  public void persistAlerts() {
    // XXX: Am I using _accessor too directly here?

    Alerts alerts = _accessor.getProperty(_keyBuilder.alerts());
    if (alerts == null) {
      alerts = new Alerts(Alerts.nodeName); // TODO: fix naming of this record, if it matters
    }
    alerts.getRecord().setMapFields(_alertsMap);
    boolean retVal = _accessor.setProperty(_keyBuilder.alerts(), alerts);
    logger.debug("persistAlerts retVal: " + retVal);
  }
View Full Code Here

    return alerts;
  }

  public void updateCache(HealthDataCache cache) {
    _cache = cache;
    Alerts alertsRecord = _cache.getAlerts();
    if (alertsRecord != null) {
      _alertsMap = alertsRecord.getMapFields();
    } else {
      _alertsMap = new HashMap<String, Map<String, String>>();
    }
  }
View Full Code Here

    // read the stats
    PersistentStats stats = _accessor.getProperty(_keyBuilder.persistantStat());

    // read the alerts
    Alerts alerts = _accessor.getProperty(_keyBuilder.alerts());

    // create the cluster snapshot object
    return new Cluster(_clusterId, resourceMap, participantMap, controllerMap, leaderId,
        clusterConstraintMap, stateModelMap, stats, alerts, userConfig, isPaused, autoJoinAllowed);
  }
View Full Code Here

      for (ConstraintType type : ConstraintType.values()) {
        Set<ConstraintId> constraints = Sets.newHashSet();
        _removedConstraints.put(type, constraints);
      }
      _removedStats = new PersistentStats(PersistentStats.nodeName);
      _removedAlerts = new Alerts(Alerts.nodeName);
      _builder = new Builder(clusterId);
    }
View Full Code Here

          stats.getMapFields().remove(removedStat);
        }
      }

      // remove alerts
      Alerts alerts = result.getAlerts();
      for (String removedAlert : _removedAlerts.getMapFields().keySet()) {
        if (alerts.getMapFields().containsKey(removedAlert)) {
          alerts.getMapFields().remove(removedAlert);
        }
      }
      return result;
    }
View Full Code Here

      _stateModelMap = new HashMap<StateModelDefId, StateModelDefinition>();
      _isPaused = false;
      _autoJoin = false;
      _userConfig = new UserConfig(Scope.cluster(id));
      _stats = new PersistentStats(PersistentStats.nodeName);
      _alerts = new Alerts(Alerts.nodeName);
    }
View Full Code Here

  }

  public void persistAlerts() {
    // XXX: Am I using _accessor too directly here?

    Alerts alerts = _accessor.getProperty(_keyBuilder.alerts());
    if (alerts == null) {
      alerts = new Alerts(Alerts.nodeName); // TODO: fix naming of this record, if it matters
    }
    alerts.getRecord().setMapFields(_alertsMap);
    boolean retVal = _accessor.setProperty(_keyBuilder.alerts(), alerts);
    logger.debug("persistAlerts retVal: " + retVal);
  }
View Full Code Here

    return alerts;
  }

  public void updateCache(HealthDataCache cache) {
    _cache = cache;
    Alerts alertsRecord = _cache.getAlerts();
    if (alertsRecord != null) {
      _alertsMap = alertsRecord.getMapFields();
    } else {
      _alertsMap = new HashMap<String, Map<String, String>>();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.helix.model.Alerts

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.