Is it possible to expose some methods to add event based flushing of buffer, along with time based approach?