@RestController @RequestMapping(value="/metrics/counters") @ExposesResourceFor(value=CounterResource.class) public class CounterController extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COUNTER_PREFIX |
protected org.springframework.hateoas.ResourceAssembler<org.springframework.boot.actuate.metrics.Metric<Double>,? extends MetricResource> |
shallowResourceAssembler |
Constructor and Description |
---|
CounterController(org.springframework.boot.actuate.metrics.repository.MetricRepository metricRepository)
Create a
CounterController that delegates to the provided MetricRepository . |
Modifier and Type | Method and Description |
---|---|
protected void |
delete(String name)
Delete (reset) a specific counter.
|
CounterResource |
display(String name)
Retrieve information about a specific counter.
|
org.springframework.hateoas.PagedResources<? extends MetricResource> |
list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<org.springframework.boot.actuate.metrics.Metric<Double>> pagedAssembler,
boolean detailed)
List Counters that match the given criteria.
|
public static final String COUNTER_PREFIX
protected final org.springframework.hateoas.ResourceAssembler<org.springframework.boot.actuate.metrics.Metric<Double>,? extends MetricResource> shallowResourceAssembler
public CounterController(org.springframework.boot.actuate.metrics.repository.MetricRepository metricRepository)
CounterController
that delegates to the provided MetricRepository
.metricRepository
- the MetricRepository
used by this controller@RequestMapping(value="", method=GET) public org.springframework.hateoas.PagedResources<? extends MetricResource> list(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<org.springframework.boot.actuate.metrics.Metric<Double>> pagedAssembler, @RequestParam(value="detailed",defaultValue="false") boolean detailed)
@RequestMapping(value="/{name}", method=GET) public CounterResource display(@PathVariable(value="name") String name)
@RequestMapping(value="/{name}", method=DELETE) @ResponseStatus(value=OK) protected void delete(@PathVariable(value="name") String name)
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.