Examples of update()


Examples of com.codahale.metrics.Histogram.update()

     * @param name Metric name.
     * @param value Metric value.
     */
    public void update(final String name, final long value) {
        final Histogram histogram = getHistogram(name);
        histogram.update(value);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of com.codahale.metrics.MergeableExponentiallyDecayingReservoir.update()

  {
    ManuallyControllableClock clock = new ManuallyControllableClock();
    MergeableExponentiallyDecayingReservoir res = new MergeableExponentiallyDecayingReservoir(10, 0.015, clock);

    clock.advanceTime(1L * NUM_MSECS_IN_SEC * NUM_NSECS_IN_MSEC)// initial data show up 1 sec after reservoir created
    res.update(3.0);
    res.update(8.0);
    res.update(9.0);
    res.update(4.0);
    res.update(7.0);
    res.update(5.0);
View Full Code Here

Examples of com.codahale.metrics.Timer.update()

      metric.update(longValue);
    }
    else if (name.startsWith("timer")) {
      long longValue = value.getValue().longValue();
      Timer metric = this.registry.timer(name);
      metric.update(longValue, TimeUnit.MILLISECONDS);
    }
    else {
      final double gauge = value.getValue().doubleValue();
      Object lock = null;
      if (this.gaugeLocks.containsKey(name)) {
View Full Code Here

Examples of com.comcast.cns.model.CNSRetryPolicy.update()

              "\"numNoDelayRetries\":0," +
              "\"backoffFunction\":\"linear\""+
                  "}";
       
        json = new JSONObject(newRetryPolicy);
        rpolicy4.update(json);
        assertTrue(rpolicy4.getMinDelayTarget() == 9);
        assertTrue(rpolicy4.getMaxDelayTarget() == 9);
        assertTrue(rpolicy4.getNumRetries() == 38);
        assertTrue(rpolicy4.getNumMinDelayRetries() == 12);
        assertTrue(rpolicy4.getNumMaxDelayRetries() == 12);
View Full Code Here

Examples of com.comcast.cns.model.CNSSubscriptionDeliveryPolicy.update()

            "}";
    
     try {
       CNSSubscriptionDeliveryPolicy subpolicy = new CNSSubscriptionDeliveryPolicy();
       JSONObject json = new JSONObject(jsonStr);
       subpolicy.update(json);
       CNSRetryPolicy hRetryPolicy = subpolicy.getHealthyRetryPolicy();
       logger.debug("hRetryPolicy is: " + hRetryPolicy.toString());
       assertTrue(hRetryPolicy.getMinDelayTarget() == 12);
       assertTrue(hRetryPolicy.getMaxDelayTarget() == 13);
       assertTrue(hRetryPolicy.getNumRetries() == 43);
View Full Code Here

Examples of com.comcast.cns.model.CNSThrottlePolicy.update()

     try {
       JSONObject json = new JSONObject(jsonStr);
       CNSThrottlePolicy tp = new CNSThrottlePolicy();
       assertTrue(tp.getMaxReceivesPerSecond() == null);
       //TODO test;
       tp.update(json);
       assertTrue(tp.getMaxReceivesPerSecond() == 5);
      
       json = new JSONObject(jsonStr2);
       tp.update(json);
       assertTrue(tp.getMaxReceivesPerSecond() == null);
View Full Code Here

Examples of com.comcast.cns.model.CNSTopicDeliveryPolicy.update()

     try {
       boolean exceptionOccured = false;
      
       CNSTopicDeliveryPolicy topicPolicy = new CNSTopicDeliveryPolicy();
       JSONObject json = new JSONObject(jsonStr);
       topicPolicy.update(json);
      
       assertTrue(topicPolicy != null);
       logger.debug("topicPolicy: " + topicPolicy.toString());
       CNSRetryPolicy hrp = topicPolicy.getDefaultHealthyRetryPolicy();
       assertTrue(hrp.getMinDelayTarget() == 21);
View Full Code Here

Examples of com.commander4j.db.JDBArchive.update()

                arch.clear();
                if (arch.create(archID) == false) {
                  JUtility.errorBeep();
                  JOptionPane.showMessageDialog(Common.mainForm, arch.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE);
                } else {
                  arch.update();
                  populateList("");
                  JLaunchMenu.runDialog("FRM_ADMIN_ARCHIVE_EDIT", archID);
                  populateList("");
                }
              }
View Full Code Here

Examples of com.commander4j.db.JDBControl.update()

                    {
                      JDBControl ctrl = new JDBControl(Common.selectedHostID, Common.sessionID);
                      if (ctrl.getProperties("SCHEMA VERSION"))
                      {
                        ctrl.setKeyValue(String.valueOf(updrst.schema_requiredVersion));
                        ctrl.update();
                      } else
                      {
                        ctrl.create("SCHEMA VERSION", String.valueOf(updrst.schema_requiredVersion), "Schema Version");
                      }
                      JOptionPane.showMessageDialog(me, "Schema Version now set to " + String.valueOf(JVersion.getSchemaVersion()), "Control Table", JOptionPane.INFORMATION_MESSAGE);
View Full Code Here

Examples of com.commander4j.db.JDBCustomer.update()

    if (customerID.equals("") == false) {
      if (cst.getCustomerProperties(customerID) == true) {
        if (customerName.equals("") == false) {
          cst.setName(customerName);
          cst.update();
        }
      }
      else {
        cst.clear();
        cst.create(customerID, customerName, "Y");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.