@Override
            protected void destroyInstance(final List list) {
                Objects.requireNonNull(list).forEach(connectionFactory ->
                    ((ConnectionFactory) connectionFactory).close()
                );
            }
This is {@link CasLdapMonitorAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-ldap-monitor/src/main/java/org/apereo/cas/config/CasLdapMonitorAutoConfiguration.java