类 DataSourcePublicMetrics
- java.lang.Object
- org.springframework.boot.actuate.endpoint.DataSourcePublicMetrics
- 所有已实现的接口:
PublicMetrics
public class DataSourcePublicMetrics extends Object implements PublicMetrics
APublicMetrics
implementation that provides data source usage statistics.- 从以下版本开始:
- 1.2.0
构造器概要
构造器 构造器 说明 DataSourcePublicMetrics()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected String
createPrefix(String name, DataSource dataSource, boolean primary)
Create the prefix to use for the metrics to associate with the givenDataSource
.void
initialize()
Collection<Metric<?>>
metrics()
Return an indication of current state through metrics.
构造器详细资料
DataSourcePublicMetrics
public DataSourcePublicMetrics()
方法详细资料
initialize
@PostConstruct public void initialize()
metrics
public Collection<Metric<?>> metrics()
从接口复制的说明:PublicMetrics
Return an indication of current state through metrics.- 指定者:
metrics
在接口中PublicMetrics
- 返回:
- the public metrics
createPrefix
protected String createPrefix(String name, DataSource dataSource, boolean primary)
Create the prefix to use for the metrics to associate with the givenDataSource
.- 参数:
name
- the name of the data source beandataSource
- the data source to configureprimary
- if this data source is the primary data source- 返回:
- a prefix for the given data source