class SkipSyncOnZeroOptimization implements Optimization {

    private final OptimizationListener listener;
    private final TimeMeter timeMeter;

    public SkipSyncOnZeroOptimization(OptimizationListener listener, TimeMeter timeMeter) {
        this.timeMeter = timeMeter;
        this.listener = listener;
    }

    @Override
    public Optimization withListener(OptimizationListener listener) {
        return new SkipSyncOnZeroOptimization(listener, timeMeter);
    }

    @Override
    public CommandExecutor apply(CommandExecutor originalExecutor) {
        SkipSyncOnZeroCommandExecutor predictiveCommandExecutor = new SkipSyncOnZeroCommandExecutor(originalExecutor, listener, timeMeter);
        return new BatchingExecutor(predictiveCommandExecutor, listener);
    }

    @Override
    public AsyncCommandExecutor apply(AsyncCommandExecutor originalExecutor) {<FILL_FUNCTION_BODY>}

}

        SkipSyncOnZeroCommandExecutor predictiveCommandExecutor = new SkipSyncOnZeroCommandExecutor(originalExecutor, listener, timeMeter);
        return new AsyncBatchingExecutor(predictiveCommandExecutor, listener);
    
<no_super_class>