Class SynchronizedPollableItemReader<T>

  • All Implemented Interfaces:
    com.redis.spring.batch.reader.PollableItemReader<T>, org.springframework.batch.item.ItemReader<T>, org.springframework.batch.item.ItemStream, org.springframework.batch.item.ItemStreamReader<T>, org.springframework.beans.factory.InitializingBean

    public class SynchronizedPollableItemReader<T>
    extends java.lang.Object
    implements com.redis.spring.batch.reader.PollableItemReader<T>, org.springframework.beans.factory.InitializingBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      void close()  
      void open​(org.springframework.batch.item.ExecutionContext executionContext)  
      T poll​(long timeout, java.util.concurrent.TimeUnit unit)  
      T read()
      This delegates to the read method of the delegate
      void setDelegate​(com.redis.spring.batch.reader.PollableItemReader<T> delegate)  
      void update​(org.springframework.batch.item.ExecutionContext executionContext)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SynchronizedPollableItemReader

        public SynchronizedPollableItemReader()
    • Method Detail

      • read

        @Nullable
        public T read()
               throws java.lang.Exception,
                      org.springframework.batch.item.UnexpectedInputException,
                      org.springframework.batch.item.ParseException,
                      org.springframework.batch.item.NonTransientResourceException
        This delegates to the read method of the delegate
        Specified by:
        read in interface org.springframework.batch.item.ItemReader<T>
        Throws:
        java.lang.Exception
        org.springframework.batch.item.UnexpectedInputException
        org.springframework.batch.item.ParseException
        org.springframework.batch.item.NonTransientResourceException
      • close

        public void close()
        Specified by:
        close in interface org.springframework.batch.item.ItemStream
      • open

        public void open​(org.springframework.batch.item.ExecutionContext executionContext)
        Specified by:
        open in interface org.springframework.batch.item.ItemStream
      • update

        public void update​(org.springframework.batch.item.ExecutionContext executionContext)
        Specified by:
        update in interface org.springframework.batch.item.ItemStream
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • setDelegate

        public void setDelegate​(com.redis.spring.batch.reader.PollableItemReader<T> delegate)
      • poll

        public T poll​(long timeout,
                      java.util.concurrent.TimeUnit unit)
               throws java.lang.Exception
        Specified by:
        poll in interface com.redis.spring.batch.reader.PollableItemReader<T>
        Throws:
        java.lang.Exception