interface PersistentInFlightDataStorer extends Closeable {
/**
* Appends a given buffer to the persisting storage.
* <p>This method may be blocking until the data is completely persisted.
* <p>If this method is non-blocking, implementers must make a defensive copy of the buffer.
*/
void append(Buffer buffer) throws IOException;
/**
* Finalizes the storage for this particular input or output.
* <p>For non-blocking append, this method must ensure that all data has been
* successfully persisted and indicate any error.
*/
@Override
void close() throws IOException;
}
|