class TaskManager {

    private final static Map<String, Task> TASK_MAP = new HashMap<>(8);
    private final static ReentrantReadWriteLock rrw = new ReentrantReadWriteLock();
    private final static Lock readLock = rrw.readLock();
    private final static Lock writeLock = rrw.writeLock();

    private static CronExecutorService cronExecutorService;

    public static void init(CronExecutorService cronExecutorService) {<FILL_FUNCTION_BODY>}

    public static CronExecutorService getExecutorService() {
        return cronExecutorService;
    }

    public static void addTask(Task task) {
        writeLock.lock();
        try {
            TASK_MAP.put(task.getName(), task);
        } finally {
            writeLock.unlock();
        }
        log.info("{}Add task [{}]", getStartedSymbol(), task.getName());
    }

    public static List<Task> getTasks() {
        Collection<Task> values;
        readLock.lock();
        try {
            values = Optional.ofNullable(TASK_MAP.values()).orElse(Collections.EMPTY_LIST);
        } finally {
            readLock.unlock();
        }
        return new ArrayList<>(values);
    }

    public static Task getTask(String name) {
        readLock.lock();
        try {
            return TASK_MAP.get(name);
        } finally {
            readLock.unlock();
        }

    }

    public static boolean stopTask(String name) {
        Task task;
        readLock.lock();
        try {
            task = TASK_MAP.get(name);
        } finally {
            readLock.unlock();
        }
        return task == null ? Boolean.FALSE : task.stop();
    }

}

        if (null != TaskManager.cronExecutorService) {
            throw new RuntimeException("Don't re-initialize the task thread pool.");
        }
        TaskManager.cronExecutorService = cronExecutorService;
        Runtime.getRuntime().addShutdownHook(new Thread(cronExecutorService::shutdown));
    
<no_super_class>