com.twitter.common.util
Interface CommandExecutor

All Known Implementing Classes:
RateLimitedCommandExecutor

public interface CommandExecutor

Asynchronous executor of enqueued tasks in a rate limited manner.


Method Summary
<E extends Exception>
void
execute(String name, ExceptionalCommand<E> task, Class<E> exceptionClass, int maxTries, Amount<Long,Time> retryDelay)
          Enqueue a task to be executed with retry semantics defined.
 

Method Detail

execute

<E extends Exception> void execute(String name,
                                   ExceptionalCommand<E> task,
                                   Class<E> exceptionClass,
                                   int maxTries,
                                   Amount<Long,Time> retryDelay)
Enqueue a task to be executed with retry semantics defined.

Parameters:
name - Human readable name for this task.
task - task to execute.
exceptionClass - Concrete exception type.
maxTries - num of tries in case of failure.
retryDelay - interval between retries in case of failure.