Package org.apache.helix.model

Examples of org.apache.helix.model.AlertStatus


    }\*/
  }

  public void refreshAlertStatus()
  {
    AlertStatus alertStatusRecord = _cache.getAlertStatus();
    if (alertStatusRecord != null) {
    _alertStatusMap = alertStatusRecord.getMapFields();
    }
    else {
      _alertStatusMap = new HashMap<String, Map<String,String>>();
    }
  }
View Full Code Here


  }

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

      if (currStatus != null) {
        addAlertStatus(alert, currStatus);
      }
    }

    AlertStatus alertStatus = _accessor.getProperty(_keyBuilder.alertStatus());
    int alertStatusSize = 0;
    if (alertStatus != null) {
      alertStatusSize = alertStatus.getMapFields().size();
    }
    //no need to persist alerts if there are none to persist and none are currently persisted
   if (_alertStatusMap.size() > || alertStatusSize > 0) {
    persistAlertStatus(); //save statuses in zk
   }
View Full Code Here

     * }\
     */
  }

  public void refreshAlertStatus() {
    AlertStatus alertStatusRecord = _cache.getAlertStatus();
    if (alertStatusRecord != null) {
      _alertStatusMap = alertStatusRecord.getMapFields();
    } else {
      _alertStatusMap = new HashMap<String, Map<String, String>>();
    }
  }
View Full Code Here

    logger.debug("persistAlerts retVal: " + retVal);
  }

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

      if (currStatus != null) {
        addAlertStatus(alert, currStatus);
      }
    }

    AlertStatus alertStatus = _accessor.getProperty(_keyBuilder.alertStatus());
    int alertStatusSize = 0;
    if (alertStatus != null) {
      alertStatusSize = alertStatus.getMapFields().size();
    }
    // no need to persist alerts if there are none to persist and none are currently persisted
    if (_alertStatusMap.size() > 0 || alertStatusSize > 0) {
      persistAlertStatus(); // save statuses in zk
    }
View Full Code Here

     * }\
     */
  }

  public void refreshAlertStatus() {
    AlertStatus alertStatusRecord = _cache.getAlertStatus();
    if (alertStatusRecord != null) {
      _alertStatusMap = alertStatusRecord.getMapFields();
    } else {
      _alertStatusMap = new HashMap<String, Map<String, String>>();
    }
  }
View Full Code Here

    logger.debug("persistAlerts retVal: " + retVal);
  }

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

      if (currStatus != null) {
        addAlertStatus(alert, currStatus);
      }
    }

    AlertStatus alertStatus = _accessor.getProperty(_keyBuilder.alertStatus());
    int alertStatusSize = 0;
    if (alertStatus != null) {
      alertStatusSize = alertStatus.getMapFields().size();
    }
    // no need to persist alerts if there are none to persist and none are currently persisted
    if (_alertStatusMap.size() > 0 || alertStatusSize > 0) {
      persistAlertStatus(); // save statuses in zk
    }
View Full Code Here

TOP

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

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.