class InMemoryTimeoutManager implements TimeoutManager, AutoCloseable {

    @Override
    public TimeoutId requestTimeout(final ExecutionContext context, final String sagaId, final long delay, final TimeUnit timeUnit, @Nullable final String name,
                               @Nullable final Object data) {
        checkNotNull(sagaId, "SagaId not allowed to be null.");
        UUIDTimeoutId id = UUIDTimeoutId.generateNewId();
        TimeoutContext timeoutContext = new TimeoutContext(context.getAllHeaders());

        SagaTimeoutTask timeoutTask = new SagaTimeoutTask(id, sagaId, name, timeout -> timeoutExpired(timeout, timeoutContext), clock, data);
        ScheduledFuture future = scheduledService.schedule(timeoutTask, delay, timeUnit);

        synchronized (sync) {
            openTimeouts.put(id, sagaId, future);
        }

        return id;
    }

    public  InMemoryTimeoutManager();
    public  InMemoryTimeoutManager(final int timerThreadPoolSize);
    public  InMemoryTimeoutManager(final ScheduledExecutorService scheduledService, final Clock clock);

}