public abstract class AbstractTask extends Object implements Task
| Modifier | Constructor and Description | 
|---|---|
protected  | 
AbstractTask(String id,
            String dataSource,
            Map<String,Object> context)  | 
protected  | 
AbstractTask(String id,
            String groupId,
            TaskResource taskResource,
            String dataSource,
            Map<String,Object> context)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
canRestore()
Returns whether or not this task can restore its progress from its on-disk working directory. 
 | 
boolean | 
equals(Object o)  | 
String | 
getClasspathPrefix()
Returns an extra classpath that should be prepended to the default classpath when running this task. 
 | 
Map<String,Object> | 
getContext()  | 
String | 
getDataSource()
Returns the datasource this task operates on. 
 | 
String | 
getGroupId()
Returns group ID of this task. 
 | 
String | 
getId()
Returns ID of this task. 
 | 
String | 
getNodeType()
Get the nodeType for if/when this task publishes on zookeeper. 
 | 
<T> QueryRunner<T> | 
getQueryRunner(Query<T> query)
Returns query runners for this task. 
 | 
TaskResource | 
getTaskResource()
Returns a  
TaskResource for this task. | 
int | 
hashCode()  | 
void | 
stopGracefully()
Asks a task to arrange for its "run" method to exit promptly. 
 | 
TaskStatus | 
success()  | 
String | 
toString()  | 
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetContextValue, getContextValue, getPriority, getType, isReady, runpublic String getId()
Taskpublic String getGroupId()
TaskgetGroupId in interface Taskpublic TaskResource getTaskResource()
TaskTaskResource for this task. Task resources define specific worker requirements a task may
 require.getTaskResource in interface TaskTaskResource for this taskpublic String getNodeType()
TaskgetNodeType in interface Taskpublic String getDataSource()
TaskgetDataSource in interface Taskpublic <T> QueryRunner<T> getQueryRunner(Query<T> query)
TaskgetQueryRunner in interface TaskT - query result typepublic String getClasspathPrefix()
TaskgetClasspathPrefix in interface Taskpublic boolean canRestore()
TaskcanRestore in interface Taskpublic void stopGracefully()
TaskTask.canRestore() returns true. Tasks that take too long to stop gracefully will be terminated with
 extreme prejudice.stopGracefully in interface Taskpublic TaskStatus success()
public Map<String,Object> getContext()
getContext in interface TaskCopyright © 2011–2018. All rights reserved.