@RestController @RequestMapping(value="/metrics/aggregate-counters") @ExposesResourceFor(value=AggregateCounterResource.class) public class AggregateCounterController extends Object
| Constructor and Description |
|---|
AggregateCounterController(AggregateCounterRepository repository) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
delete(String name)
Delete (reset) a specific counter.
|
AggregateCounterResource |
display(String name)
Retrieve information about a specific aggregate counter.
|
AggregateCounterResource |
display(String name,
org.joda.time.DateTime from,
org.joda.time.DateTime to,
AggregateCounterResolution resolution)
Retrieve counts for a given time interval, using some precision.
|
org.springframework.hateoas.PagedResources<AggregateCounterResource> |
list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<String> pagedAssembler,
boolean detailed,
org.joda.time.DateTime from,
org.joda.time.DateTime to,
AggregateCounterResolution resolution)
List Counters that match the given criteria.
|
public AggregateCounterController(AggregateCounterRepository repository)
@RequestMapping(value="/{name}",
method=GET)
public AggregateCounterResource display(@PathVariable(value="name")
String name)
@RequestMapping(value="/{name}",
method=DELETE)
@ResponseStatus(value=OK)
protected void delete(@PathVariable(value="name")
String name)
@RequestMapping(value="",
method=GET)
public org.springframework.hateoas.PagedResources<AggregateCounterResource> list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<String> pagedAssembler,
@RequestParam(value="detailed",defaultValue="false")
boolean detailed,
@RequestParam(value="from",required=false)@DateTimeFormat(iso=DATE_TIME)
org.joda.time.DateTime from,
@RequestParam(value="to",required=false)@DateTimeFormat(iso=DATE_TIME)
org.joda.time.DateTime to,
@RequestParam(value="resolution",defaultValue="hour")
AggregateCounterResolution resolution)
@ResponseBody
@RequestMapping(value="/{name}",
method=GET,
produces="application/json")
public AggregateCounterResource display(@PathVariable(value="name")
String name,
@RequestParam(value="from",required=false)@DateTimeFormat(iso=DATE_TIME)
org.joda.time.DateTime from,
@RequestParam(value="to",required=false)@DateTimeFormat(iso=DATE_TIME)
org.joda.time.DateTime to,
@RequestParam(value="resolution",defaultValue="hour")
AggregateCounterResolution resolution)
name - the name of the aggregate counter we want to retrieve data fromfrom - the start-time for the interval, default depends on the resolution (e.g. go back 1 day for hourly
buckets)to - the end-time for the interval, default "now"resolution - the size of buckets to aggregate, e.g. hourly, daily, etc. (default "hour")Copyright © 2016 Pivotal Software, Inc.. All rights reserved.