package com.atlassian.stash.internal.concurrent;

import java.util.concurrent.TimeUnit;

/**
 * A {@link StateTransferringExecutorService} with the ability to be paused.
 */
public class PauseableStateTransferringExecutorService extends StateTransferringExecutorService implements PauseableExecutorService {

    private final PauseableExecutorService delegate;

    public PauseableStateTransferringExecutorService(PauseableExecutorService delegate) {
        super(delegate);
        this.delegate = delegate;
    }

    @Override
    public void pauseFor(long pauseTime, TimeUnit unit) {
        delegate.pauseFor(pauseTime, unit);
    }
}
