Created
July 16, 2018 05:21
-
-
Save narendly/57c4e957c639cf1738b6e6be70fd9977 to your computer and use it in GitHub Desktop.
TaskFactory implementation by Espresso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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