public void connect(PipeTasks pipeTasks) {
// A multi sink receives multiple streams of data, so we must connect
// them up one by one.
for (int i = 0; i < task.getChangeSinkCount(); i++) {
ChangeSink sink;
ChangeSource source;
// Retrieve the next sink.
sink = task.getChangeSink(i);
// Retrieve the appropriate source.
source = (ChangeSource) getInputTask(pipeTasks, i, ChangeSource.class);
// Connect the tasks.
source.setChangeSink(sink);
}
// Register the source as an output task.
setOutputTask(pipeTasks, task, 0);
}