public class SimpleDataSourceHealthIndicator extends Object implements HealthIndicator<Map<String,Object>>
HealthIndicator
that returns a status and also
attempts a simple database test.Constructor and Description |
---|
SimpleDataSourceHealthIndicator()
Create a new
SimpleDataSourceHealthIndicator instance. |
SimpleDataSourceHealthIndicator(DataSource dataSource)
Create a new
SimpleDataSourceHealthIndicator using the specified datasource. |
Modifier and Type | Method and Description |
---|---|
protected String |
detectQuery(String product) |
Map<String,Object> |
health() |
void |
setDataSource(DataSource dataSource) |
void |
setQuery(String query) |
public SimpleDataSourceHealthIndicator()
SimpleDataSourceHealthIndicator
instance.public SimpleDataSourceHealthIndicator(DataSource dataSource)
SimpleDataSourceHealthIndicator
using the specified datasource.dataSource
- the data sourcepublic Map<String,Object> health()
health
in interface HealthIndicator<Map<String,Object>>
public void setDataSource(DataSource dataSource)
public void setQuery(String query)
Copyright © 2014 Pivotal Software, Inc.. All rights reserved.