In a typical pipeline scenario, say I have a bounded stream, where I read from a file. Is there a way in Jet where I can subscribe to an "OnComplete" event, which will be triggered once the stream is written to sink? I don't seem to find such an option. I want something like below.
p.readFrom(fileSource)
.writeTo(Sinks.logger())
.onComplete(doSomething());
Edit :
Reference for the comment.
BatchStage stage = p.readFrom(source).map(transform);
stage.map(enrich)
.writeTo(Sinks.filesBuilder(folder1).build())
.onComplete(doSomething1());
stage.map(enrich2)
.aggregate(...)
.writeTo(Sinks.filesBuilder(folder2).build())
.onComplete(doSomething2());