接口 ItemStream
- 所有已知子接口:
ItemStreamReader<T>
,ItemStreamWriter<T>
,ResourceAwareItemReaderItemStream<T>
,ResourceAwareItemWriterItemStream<T>
- 所有已知实现类:
AbstractCursorItemReader
,AbstractFileItemWriter
,AbstractItemCountingItemStreamItemReader
,AbstractItemStreamItemReader
,AbstractItemStreamItemWriter
,AbstractNeo4jItemReader
,AbstractPaginatedDataItemReader
,AbstractPagingItemReader
,AsyncItemWriter
,CheckpointSupport
,ChunkMessageChannelItemWriter
,ChunkMonitor
,CompositeItemStream
,CompositeItemWriter
,FlatFileItemReader
,FlatFileItemWriter
,HibernateCursorItemReader
,HibernatePagingItemReader
,ItemReaderAdapter
,ItemStreamSupport
,ItemWriterAdapter
,JdbcCursorItemReader
,JdbcPagingItemReader
,JpaPagingItemReader
,JsonFileItemWriter
,JsonItemReader
,LdifReader
,MappingLdifReader
,MongoItemReader
,MultiResourceItemReader
,MultiResourceItemWriter
,Neo4jItemReader
,RepositoryItemReader
,ResourcesItemReader
,SingleItemPeekableItemReader
,StaxEventItemReader
,StaxEventItemWriter
,StoredProcedureItemReader
,SynchronizedItemStreamReader
,TradeWriter
public interface ItemStream
Marker interface defining a contract for periodically storing state and restoring from that state should an error occur.
- 作者:
- Dave Syer, Lucas Ward
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
close()
If any resources are needed for the stream to operate they need to be destroyed here.void
open(ExecutionContext executionContext)
Open the stream for the providedExecutionContext
.void
update(ExecutionContext executionContext)
Indicates that the execution context provided during open is about to be saved.
方法详细资料
open
void open(ExecutionContext executionContext) throws ItemStreamException
Open the stream for the providedExecutionContext
.- 参数:
executionContext
- current step'sExecutionContext
. Will be the executionContext from the last run of the step on a restart.- 抛出:
java.lang.IllegalArgumentException
- if context is nullItemStreamException
update
void update(ExecutionContext executionContext) throws ItemStreamException
Indicates that the execution context provided during open is about to be saved. If any state is remaining, but has not been put in the context, it should be added here.- 参数:
executionContext
- to be updated- 抛出:
java.lang.IllegalArgumentException
- if executionContext is null.ItemStreamException
close
void close() throws ItemStreamException
If any resources are needed for the stream to operate they need to be destroyed here. Once this method has been called all other methods (except open) may throw an exception.