From a5b934822c5b11960dcc50e84d573335bad89ee5 Mon Sep 17 00:00:00 2001
From: dsyer Basic interface for generic output operations. Class implementing this
+ *
+ * Basic interface for generic output operations. Class implementing this
* interface will be responsible for serializing objects as necessary.
* Generally, it is responsibility of implementing class to decide which
- * technology to use for mapping and how it should be configured.
- * Due to the nature of batch processing, it is expected that most writers - * will buffer output. A flush method is provided to the interface in order - * to ensure that any buffers can be flushed before a transaction is - * committed. Along the same lines, if a transaction has been rolled back, - * then the contents of any buffers should be thrown away. + * Due to the nature of batch processing, it is expected that most writers will + * buffer output. A flush method is provided to the interface in order to ensure + * that any buffers can be flushed before a transaction is committed. Along the + * same lines, if a transaction has been rolled back, then the contents of any + * buffers should be thrown away. *
* * @author Dave Syer @@ -46,18 +47,22 @@ public interface ItemWriter { * rethrow it as appropriate. */ void write(Object item) throws Exception; - + /** - * Flush any buffers that are being held. This will usually be performed + * Flush any buffers that are being held. This will usually be performed * prior to committing any transactions. - * @throws FlushFailedException TODO + * @throws FlushFailedException in case of an error. If this exception is + * thrown the writer may be in an inconsistent state and manual intervention + * might be required to reconcile the data with persistent output. */ void flush() throws FlushFailedException; - + /** - * Clear any buffers that are being held. This will usually be performed + * Clear any buffers that are being held. This will usually be performed * prior to rolling back any transactions. - * @throws ClearFailedException TODO + * @throws ClearFailedException in case of an error. If this exception is + * thrown the writer may be in an inconsistent state and manual intervention + * might be required to reconcile the data with persistent output. */ void clear() throws ClearFailedException; }