class DefaultCallbackHolder implements Callbackable {
    private final List<Pair<Runnable, Executor>> taskList = new ArrayList<>();
    private volatile boolean isFinished = false;

    public void addFinishCallback(Runnable runnable, Executor executor) {
        if (!isFinished) {
            synchronized (this) {
                if (!isFinished) {
                    taskList.add(Pair.of(runnable, executor));
                    return;
                }
            }
        }
        process(runnable, executor);
    }

    @Override
    public void onFinish() {<FILL_FUNCTION_BODY>}

    private void process(Runnable runnable, Executor executor) {
        if (executor == null) {
            executor = AsyncUtil.getDefaultCallbackExecutor();
        }
        try {
            executor.execute(runnable);
        } catch (Exception e) {
            LoggerUtil.error("Callbackable response exec callback task error, e: ", e);
        }
    }
}

        if (!isFinished) {
            synchronized (this) {
                if (!isFinished) {
                    for (Pair<Runnable, Executor> pair : taskList) {
                        process(pair.getKey(), pair.getValue());
                    }
                    isFinished = true;
                }
            }
        }
    
<no_super_class>