Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
TaskFactory implementation by Espresso
public class BackupTaskFactory implements TaskFactory {
/**
* Returns a {@link Task} instance.
* @param context Contextual information for the task, including task and job configurations
* @return A {@link Task} instance.
*/
Task createNewTask(TaskCallbackContext context) {
String targetPartition = taskContext.getTaskConfig().getTargetPartition();
return new BackupTask(partition);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.