public class SleepOperation extends AbstractOperation
Constructor and Description |
---|
SleepOperation(long sleep)
Creates a new sleep operation
|
SleepOperation(String name,
long sleep)
Creates a new sleep operation
|
Modifier and Type | Method and Description |
---|---|
<T extends Options> |
canRun(Runner<T> runner,
T options)
Report whether the operation can run based on the available options
|
<T extends Options> |
createCallable(Runner<T> runner,
T options)
Creates the callable for running the operation in a background thread
|
OperationRun |
createErrorInformation(String message,
int category,
long runtime)
Creates run information for an error
|
String |
getContentString()
Gets a string that shows the content of the operation e.g.
|
String |
getType()
Gets a descriptive type string for the operation e.g.
|
getId, getName, getStats, setId
public SleepOperation(long sleep)
sleep
- Sleep time in secondspublic SleepOperation(String name, long sleep)
name
- Namesleep
- Sleep time in secondspublic <T extends Options> boolean canRun(Runner<T> runner, T options)
Operation
runner
- Runneroptions
- Optionspublic String getType()
Operation
public String getContentString()
Operation
public <T extends Options> OperationCallable<T> createCallable(Runner<T> runner, T options)
Operation
runner
- Runneroptions
- Optionspublic OperationRun createErrorInformation(String message, int category, long runtime)
Operation
message
- Error messagecategory
- Error categoryruntime
- RuntimeCopyright © 2015. All rights reserved.