public class ItemWriterAdapter<T> extends CheckpointSupport implements ItemWriter<T>
ItemWriter for use by Spring Batch. All calls are delegated as appropriate
to the corresponding method on the delegate.| Constructor and Description |
|---|
ItemWriterAdapter(javax.batch.api.chunk.ItemWriter writer) |
| Modifier and Type | Method and Description |
|---|---|
protected java.io.Serializable |
doCheckpoint()
Used to provide a
Serializable representing the current state of the
batch artifact. |
protected void |
doClose()
Used to close the underlying batch artifact
|
protected void |
doOpen(java.io.Serializable checkpoint)
Used to open a batch artifact with previously saved checkpoint information.
|
void |
write(java.util.List<? extends T> items)
Process the supplied data element.
|
close, open, updategetExecutionContextKey, setExecutionContextName, setNamepublic ItemWriterAdapter(javax.batch.api.chunk.ItemWriter writer)
writer - a ItemWriter to delegate calls topublic void write(java.util.List<? extends T> items) throws java.lang.Exception
ItemWriterwrite in interface ItemWriter<T>items - items to be writtenjava.lang.Exception - if there are errors. The framework will catch the
exception and convert or rethrow it as appropriate.protected void doOpen(java.io.Serializable checkpoint)
throws java.lang.Exception
CheckpointSupportdoOpen in class CheckpointSupportcheckpoint - previously saved checkpoint objectjava.lang.Exception - thrown by the implementationprotected java.io.Serializable doCheckpoint()
throws java.lang.Exception
CheckpointSupportSerializable representing the current state of the
batch artifact.doCheckpoint in class CheckpointSupportjava.lang.Exception - thrown by the implementationprotected void doClose()
throws java.lang.Exception
CheckpointSupportdoClose in class CheckpointSupportjava.lang.Exception - thrown by the underlying implementation