src/main/java/io/axoniq/axonserver/connector/AxonServerConnectionFactory.java
/**
     * Shuts down the connector, disconnecting from all contexts. To reconnect after calling this method, a new instance
     * of the ConnectionFactory needs to be created.
     * <p>
     * In case where regular reconnection is required, consider using {@link AxonServerConnection#disconnect()} on the
     * connections created by this factory instead.
     *
     * @see AxonServerConnection#disconnect()
     */
Shuts down the connector, disconnecting from all contexts. To reconnect after calling this method, a new instance
of the ConnectionFactory needs to be created.

In case where regular reconnection is required, consider using  AxonServerConnection#disconnect() on the
connections created by this factory instead.


Shuts down the connector disconnecting from all contexts . To reconnect after calling this method a new instance of the ConnectionFactory needs to be created . In case where regular reconnection is required consider using AxonServerConnection#disconnect () on the connections created by this factory instead .
public void shutdown() {
        shutdown = true;
        connections.forEach((k, conn) -> conn.disconnect());
        executorService.shutdown();
        try {
            executorService.awaitTermination(2, TimeUnit.SECONDS);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
        if (!executorService.isTerminated()) {
            logger.warn("Forcefully shutting down executor service.");
            executorService.shutdownNow();
        }
    }
public void shutdown ( ) { shutdown = true ; connections . forEach ( ( k , conn ) -> conn . disconnect ( ) ) ; executorService . shutdown ( ) ; try { executorService . awaitTermination ( 2 , TimeUnit . SECONDS ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } if ( ! executorService . isTerminated ( ) ) { logger . warn ( "Forcefully shutting down executor service." ) ; executorService . shutdownNow ( ) ; } }
Shuts down the connector, disconnecting from all contexts.
Shuts down the connector disconnecting from all contexts .