类 AsyncItemWriter<T>

  • 所有已实现的接口:
    ItemStream, ItemStreamWriter<java.util.concurrent.Future<T>>, ItemWriter<java.util.concurrent.Future<T>>, org.springframework.beans.factory.InitializingBean

    public class AsyncItemWriter<T>
    extends java.lang.Object
    implements ItemStreamWriter<java.util.concurrent.Future<T>>, org.springframework.beans.factory.InitializingBean
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      voidafterPropertiesSet() 
      voidclose()
      If any resources are needed for the stream to operate they need to be destroyed here.
      voidopen​(ExecutionContext executionContext)
      Open the stream for the provided ExecutionContext.
      voidsetDelegate​(ItemWriter<T> delegate) 
      voidupdate​(ExecutionContext executionContext)
      Indicates that the execution context provided during open is about to be saved.
      voidwrite​(java.util.List<? extends java.util.concurrent.Future<T>> items)
      In the processing of the Futures passed, nulls are not passed to the delegate since they are considered filtered out by the AsyncItemProcessor's delegated ItemProcessor.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 方法详细资料

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        指定者:
        afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
        抛出:
        java.lang.Exception
      • setDelegate

        public void setDelegate​(ItemWriter<T> delegate)
        参数:
        delegate - ItemWriter that does the actual writing of the Future results
      • write

        public void write​(java.util.List<? extends java.util.concurrent.Future<T>> items)
                   throws java.lang.Exception
        In the processing of the Futures passed, nulls are not passed to the delegate since they are considered filtered out by the AsyncItemProcessor's delegated ItemProcessor. If the unwrapping of the Future results in an ExecutionException, that will be unwrapped and the cause will be thrown.
        指定者:
        write 在接口中 ItemWriter<T>
        参数:
        items - Futures to be unwrapped and passed to the delegate
        抛出:
        java.lang.Exception - The exception returned by the Future if one was thrown