Tweaking writer API for failed rotations.

There are now two FinishedRotation() methods, one that triggers
post-processing and one that doesn't. There's also insurance built in
against a writer not calling either (or both), in which case we abort
with an internal error.
This commit is contained in:
Robin Sommer 2012-07-28 11:55:31 -07:00
parent 4359bf6b42
commit 4ba038070f
12 changed files with 65 additions and 74 deletions

View file

@ -177,13 +177,7 @@ protected:
// Signals that a file has been rotated.
bool FinishedRotation(WriterFrontend* writer, const char* new_name, const char* old_name,
double open, double close, bool terminating);
// Signals that a file couldn't be rotated, either because the writer
// implementation decided there was nothing to do or because a real error
// occurred. In the error case, a separate message for the reason is sent.
bool FailedRotation(WriterFrontend* writer, const char* filename,
double open, double close, bool terminating);
double open, double close, bool success, bool terminating);
// Deletes the values as passed into Write().
void DeleteVals(int num_fields, threading::Value** vals);