class PrioritizedFifoExecutor {

    public ListenableFuture<?> submit(T task)
    {
        FifoRunnableTask<T> fifoTask = new FifoRunnableTask<>(task, sequenceNumber.incrementAndGet(), taskComparator);
        queue.add(fifoTask);
        executorService.submit(triggerTask);
        return fifoTask;
    }

    public  PrioritizedFifoExecutor(ExecutorService coreExecutor, int maxThreads, Comparator<T> taskComparator);

}