uk.co.codera.lang.concurrent.Command Maven / Gradle / Ivy
package uk.co.codera.lang.concurrent;
/**
*
* A command is simply a request to do something. It is not guaranteed that the
* command will either be executed or successful.
*
*
* The mechanism to execute a command is to create a {@link Task} and schedule
* it with the {@link PriorityTaskExecutor} for execution.
*
*
* The task is reponsible for determining if the command should be run. The
* command should only be concerned with the business logic that should be run
* and not how or when it gets executed.
*
*
* @author andystewart
*/
@FunctionalInterface
public interface Command {
void execute();
}