Created
November 17, 2017 02:58
-
-
Save DImuthuUpe/ec72df1ec3207ce2dce88ff7f1756da4 to your computer and use it in GitHub Desktop.
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
Map<String, TaskFactory> taskRegistry = new HashMap<String, TaskFactory>(); | |
/* | |
taskRegistry.put(CommandTask.NAME, new TaskFactory() { | |
@Override | |
public Task createNewTask(TaskCallbackContext context) { | |
return new CommandTask(context); | |
} | |
}); | |
*/ | |
taskRegistry.put(DataCollectingTask.NAME, new TaskFactory() { | |
@Override | |
public Task createNewTask(TaskCallbackContext context) { | |
return new DataCollectingTask(context); | |
} | |
}); | |
/* | |
taskRegistry.put(DataPushingTask.NAME, new TaskFactory() { | |
@Override | |
public Task createNewTask(TaskCallbackContext context) { | |
return new DataPushingTask(context); | |
} | |
}); | |
*/ | |
machineEngine.registerStateModelFactory("Task", new TaskStateModelFactory(zkHelixManager, taskRegistry)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment