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

Examples of org.springframework.xd.rest.domain.metrics.AggregateCountsResource.addValue()


    AggregateCountsResource result = new AggregateCountsResource(entity.getName());
    ReadablePeriod increment = entity.getResolution().unitPeriod;
    DateTime end = entity.getInterval().getEnd();
    int i = 0;
    for (DateTime when = entity.getInterval().getStart(); !when.isAfter(end); when = when.plus(increment)) {
      result.addValue(new Date(when.getMillis()), entity.getCounts()[i++]);
    }
    return result;
  }
}
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.