Skip to content

Instantly share code, notes, and snippets.

@DImuthuUpe
Created November 17, 2017 02:58
Show Gist options
  • Save DImuthuUpe/ec72df1ec3207ce2dce88ff7f1756da4 to your computer and use it in GitHub Desktop.
Save DImuthuUpe/ec72df1ec3207ce2dce88ff7f1756da4 to your computer and use it in GitHub Desktop.
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