Class HikariCheckpointRestoreLifecycle
java.lang.Object
org.springframework.boot.jdbc.HikariCheckpointRestoreLifecycle
- All Implemented Interfaces:
Lifecycle
Lifecycle for a HikariDataSource allowing it to participate in
checkpoint-restore. When stopped, and the data source
allows it, its pool is suspended,
blocking any attempts to borrow connections. Open and idle connections are then
evicted. When subsequently started, the pool is
resumed if necessary.- Since:
- 3.2.0
- Author:
- Christoph Strobl, Andy Wilkinson, Moritz Halbritter
-
Constructor Summary
ConstructorsConstructorDescriptionHikariCheckpointRestoreLifecycle(DataSource dataSource, ConfigurableApplicationContext applicationContext) Creates a newHikariCheckpointRestoreLifecyclethat will allow the givendataSourceto participate in checkpoint-restore. -
Method Summary
-
Constructor Details
-
HikariCheckpointRestoreLifecycle
public HikariCheckpointRestoreLifecycle(DataSource dataSource, ConfigurableApplicationContext applicationContext) Creates a newHikariCheckpointRestoreLifecyclethat will allow the givendataSourceto participate in checkpoint-restore. ThedataSourceisunwrappedto aHikariDataSource. If such unwrapping is not possible, the lifecycle will have no effect.- Parameters:
dataSource- the checkpoint-restore participantapplicationContext- the application context- Since:
- 3.4.0
-
-
Method Details
-
start
-
stop
-
isRunning
-