Class ChunkMessageChannelItemWriter<T>

    • Constructor Detail

      • ChunkMessageChannelItemWriter

        public ChunkMessageChannelItemWriter()
    • Method Detail

      • setMaxWaitTimeouts

        public void setMaxWaitTimeouts​(int maxWaitTimeouts)
        The maximum number of times to wait at the end of a step for a non-null result from the remote workers. This is a multiplier on the receive timeout set separately on the gateway. The ideal value is a compromise between allowing slow workers time to finish, and responsiveness if there is a dead worker. Defaults to 40.
        Parameters:
        maxWaitTimeouts - the maximum number of wait timeouts
      • setThrottleLimit

        public void setThrottleLimit​(long throttleLimit)
        Public setter for the throttle limit. This limits the number of pending requests for chunk processing to avoid overwhelming the receivers.
        Parameters:
        throttleLimit - the throttle limit to set
      • setMessagingOperations

        public void setMessagingOperations​(org.springframework.integration.core.MessagingTemplate messagingGateway)
      • setReplyChannel

        public void setReplyChannel​(org.springframework.messaging.PollableChannel replyChannel)
      • write

        public void write​(java.util.List<? extends T> items)
                   throws java.lang.Exception
        Description copied from interface: ItemWriter
        Process the supplied data element. Will not be called with any null items in normal operation.
        Specified by:
        write in interface ItemWriter<T>
        Parameters:
        items - items to be written
        Throws:
        java.lang.Exception - if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.
      • close

        public void close()
                   throws ItemStreamException
        Description copied from interface: ItemStream
        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.
        Specified by:
        close in interface ItemStream
        Throws:
        ItemStreamException
      • update

        public void update​(ExecutionContext executionContext)
                    throws ItemStreamException
        Description copied from interface: ItemStream
        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.
        Specified by:
        update in interface ItemStream
        Parameters:
        executionContext - to be updated
        Throws:
        ItemStreamException