Added event api so that outputadapters can tell when data is ready to be written