Interface DatabaseConnectionStateService
- All Known Implementing Classes:
DefaultDatabaseConnectionStateService
public interface DatabaseConnectionStateService
Service providing information about current database connection state.
- Since:
- 8.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum -
Method Summary
Modifier and TypeMethodDescriptionReturns database latency, the result might be cached for optimization reasons.getState()Returns database connection state, the result might be cached for optimization reasons.
-
Method Details
-
getLatency
Returns database latency, the result might be cached for optimization reasons.- Returns:
- database latency when database can be reached, empty optional otherwise
-
getState
Returns database connection state, the result might be cached for optimization reasons.- Returns:
DatabaseConnectionStateService.DatabaseConnectionState.CONNECTEDwhen database can be reached,DatabaseConnectionStateService.DatabaseConnectionState.DISCONNECTEDotherwise
-