presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/backup/TimeoutBackupStore.java/TimeoutBackupStore/timeLimited
class TimeoutBackupStore:    private static <T> T timeLimited(T target, Class<T> clazz, Duration timeout, ExecutorService executor, int maxThreads)
    {
        executor = new ExecutorServiceAdapter(new BoundedExecutor(executor, maxThreads));
        TimeLimiter limiter = SimpleTimeLimiter.create(executor);
        return limiter.newProxy(target, clazz, timeout.toMillis(), MILLISECONDS);
    }