org.springframework.batch.item
Class AbstractItemWriter

java.lang.Object
  extended by org.springframework.batch.item.AbstractItemWriter
All Implemented Interfaces:
ItemWriter

public abstract class AbstractItemWriter
extends Object
implements ItemWriter

Abstract ItemWriter that allows for base classes to only implement the close method if they need it. Because it is likely that the flush and clear methods may not need to be implemented, they are provided in this class.

Author:
Lucas Ward

Constructor Summary
AbstractItemWriter()
           
 
Method Summary
 void clear()
          Clear any buffers that are being held.
 void flush()
          Flush any buffers that are being held.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.batch.item.ItemWriter
write
 

Constructor Detail

AbstractItemWriter

public AbstractItemWriter()
Method Detail

flush

public void flush()
           throws FlushFailedException
Description copied from interface: ItemWriter
Flush any buffers that are being held. This will usually be performed prior to committing any transactions.

Specified by:
flush in interface ItemWriter
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.

clear

public void clear()
           throws ClearFailedException
Description copied from interface: ItemWriter
Clear any buffers that are being held. This will usually be performed prior to rolling back any transactions.

Specified by:
clear in interface ItemWriter
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.


Copyright © 2008 SpringSource. All Rights Reserved.