Package org.springframework.xd.rest.domain.metrics

Examples of org.springframework.xd.rest.domain.metrics.GaugeResource


    return createResourceWithId(entity.getName(), entity);
  }

  @Override
  protected GaugeResource instantiateResource(Gauge entity) {
    return new GaugeResource(entity.getName(), entity.getValue());
  }
View Full Code Here


  @CliCommand(value = DISPLAY_GAUGE, help = "Display the value of a gauge")
  public String display(
      @CliOption(key = { "", "name" }, help = "the name of the gauge to display", mandatory = true, optionContext = "existing-gauge disable-string-converter") String name,
      @CliOption(key = "pattern", help = "the pattern used to format the value (see DecimalFormat)", mandatory = false, unspecifiedDefaultValue = NumberFormatConverter.DEFAULT) NumberFormat pattern) {
    GaugeResource gauge = gaugeOperations().retrieve(name);
    return pattern.format(gauge.getValue());
  }
View Full Code Here

TOP

Related Classes of org.springframework.xd.rest.domain.metrics.GaugeResource

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.