class ClientScheduler extends NetScheduler {

    private static final Logger logger = LoggerFactory.getLogger(ClientScheduler.class);

    // 杂七杂八的任务，数量不多，执行完就删除
    private final ConcurrentLinkedQueue<AsyncTask> miscTasks = new ConcurrentLinkedQueue<>();
    private final NetClient netClient;

    public ClientScheduler(int id, int schedulerCount, Map<String, String> config) {
        super(id, "CScheduleService-" + id,
                MapUtils.getInt(config, ConnectionSetting.NET_CLIENT_COUNT.name(), schedulerCount),
                config, false);
        NetFactory netFactory = NetFactory.getFactory(config);
        netClient = netFactory.createNetClient();
        netEventLoop.setNetClient(netClient);
        getThread().setDaemon(true);
    }

    @Override
    public Logger getLogger() {
        return logger;
    }

    @Override
    public long getLoad() {
        return super.getLoad() + miscTasks.size();
    }

    @Override
    public void handle(AsyncTask task) {
        miscTasks.add(task);
        wakeUp();
    }

    @Override
    protected void runMiscTasks() {
        runMiscTasks(miscTasks);
    }

    @Override
    public void run() {
        long lastTime = System.currentTimeMillis();
        while (!stopped) {
            runMiscTasks();
            runEventLoop();

            long currentTime = System.currentTimeMillis();
            if (currentTime - lastTime > 1000) {
                lastTime = currentTime;
                checkTimeout(currentTime);
            }
        }
        onStopped();
    }

    private void checkTimeout(long currentTime) {<FILL_FUNCTION_BODY>}

    @Override
    public void executeNextStatement() {
        // 客户端阻塞在同步方法时运行事件循环执行回调
        runEventLoop();
    }

    private static volatile SchedulerFactory clientSchedulerFactory;

    public static Scheduler getScheduler(ConnectionInfo ci, Map<String, String> config) {
        if (clientSchedulerFactory == null) {
            synchronized (ClientScheduler.class) {
                if (clientSchedulerFactory == null) {
                    clientSchedulerFactory = SchedulerFactoryBase
                            .createSchedulerFactory(ClientScheduler.class.getName(), config);
                }
            }
        }
        return SchedulerFactoryBase.getScheduler(clientSchedulerFactory, ci);
    }
}

        try {
            netClient.checkTimeout(currentTime);
        } catch (Throwable t) {
            logger.warn("Failed to checkTimeout", t);
        }
    
<methods>public void <init>(int, java.lang.String, int, Map<java.lang.String,java.lang.String>, boolean) ,public com.lealone.db.DataBufferFactory getDataBufferFactory() ,public com.lealone.net.NetEventLoop getNetEventLoop() ,public java.nio.channels.Selector getSelector() ,public void registerAccepter(com.lealone.server.ProtocolServer, java.nio.channels.ServerSocketChannel) ,public void wakeUp() <variables>protected final non-sealed com.lealone.net.NetEventLoop netEventLoop