use of org.hibernate.reactive.util.impl.CompletionStages in project hibernate-reactive by hibernate.
the class ReactiveBulkIdStrategy method release.
@Override
public void release(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess) {
if (serviceRegistry != null && !dropGlobalTemporaryTables.isEmpty()) {
boolean dropIdTables = serviceRegistry.getService(ConfigurationService.class).getSetting(GlobalTemporaryTableBulkIdStrategy.DROP_ID_TABLES, StandardConverters.BOOLEAN, false);
if (dropIdTables) {
ReactiveConnection connection = serviceRegistry.getService(ReactiveConnectionPool.class).getProxyConnection();
loop(dropGlobalTemporaryTables, connection::execute).whenComplete((v, e) -> connection.close()).handle(CompletionStages::ignoreErrors).toCompletableFuture().join();
}
}
}
Aggregations