class DefaultConnectionMonitor extends AbstractLifeCycle {

    private static final Logger             logger = BoltLoggerFactory.getLogger("CommonDefault");

    private final ConnectionManager         connectionManager;
    private final ConnectionMonitorStrategy strategy;

    private ScheduledThreadPoolExecutor     executor;

    public DefaultConnectionMonitor(ConnectionMonitorStrategy strategy,
                                    ConnectionManager connectionManager) {
        if (strategy == null) {
            throw new IllegalArgumentException("null strategy");
        }

        if (connectionManager == null) {
            throw new IllegalArgumentException("null connectionManager");
        }

        this.strategy = strategy;
        this.connectionManager = connectionManager;
    }

    @Override
    public void startup() throws LifeCycleException {<FILL_FUNCTION_BODY>}

    @Override
    public void shutdown() throws LifeCycleException {
        super.shutdown();

        executor.purge();
        executor.shutdown();
    }

    /**
     * Start schedule task
     * please use {@link DefaultConnectionMonitor#startup()} instead
     */
    @Deprecated
    public void start() {
        startup();
    }

    /**
     * cancel task and shutdown executor
     * please use {@link DefaultConnectionMonitor#shutdown()} instead
     */
    @Deprecated
    public void destroy() {
        shutdown();
    }
}

        super.startup();

        /* initial delay to execute schedule task, unit: ms */
        long initialDelay = ConfigManager.conn_monitor_initial_delay();

        /* period of schedule task, unit: ms*/
        long period = ConfigManager.conn_monitor_period();

        this.executor = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory(
            "ConnectionMonitorThread", true), new ThreadPoolExecutor.AbortPolicy());
        this.executor.scheduleAtFixedRate(new Runnable() {
            @Override
            public void run() {
                try {
                    Map<String, RunStateRecordedFutureTask<ConnectionPool>> connPools = null;
                    if (connectionManager instanceof DefaultConnectionManager) {
                        connPools = ((DefaultConnectionManager) connectionManager).getConnPools();
                    }
                    strategy.monitor(connPools);
                } catch (Exception e) {
                    logger.warn("MonitorTask error", e);
                }
            }
        }, initialDelay, period, TimeUnit.MILLISECONDS);
    
<methods>public non-sealed void <init>() ,public boolean isStarted() ,public void shutdown() throws com.alipay.remoting.LifeCycleException,public void startup() throws com.alipay.remoting.LifeCycleException<variables>private final java.util.concurrent.atomic.AtomicBoolean isStarted