org.springframework.batch.item.support
Class AbstractItemWriter

java.lang.Object
  extended by org.springframework.batch.item.support.AbstractItemWriter
All Implemented Interfaces:
ItemWriter
Direct Known Subclasses:
ExampleItemWriter, MessageChannelItemWriter

public abstract class AbstractItemWriter
extends Object
implements ItemWriter

Abstract ItemWriter that allows for base classes to only implement the flush() and clear() methods if they need it.

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 © 2009 SpringSource. All Rights Reserved.