Interface QueueConsumer<PayloadT>

  • Type Parameters:
    PayloadT - The type of the payload in the task

    public interface QueueConsumer<PayloadT>
    Task processor for the queue
    Since:
    09.07.2017
    • Method Detail

      • execute

        @Nonnull
        TaskExecutionResult execute​(@Nonnull
                                    Task<PayloadT> task)
        Process the task from the queue
        Parameters:
        task - A typed task for processing
        Returns:
        A result of task processing
      • getQueueConfig

        @Nonnull
        QueueConfig getQueueConfig()
        Get queue configuration
        Returns:
        Queue configuration
      • getPayloadTransformer

        @Nonnull
        TaskPayloadTransformer<PayloadT> getPayloadTransformer()
        Get task payload transformer, which transform the task's String payload into the type of the task
        Returns:
        Task payload transformer
      • getExecutor

        default java.util.Optional<java.util.concurrent.Executor> getExecutor()
        Task executor for ProcessingMode.USE_EXTERNAL_EXECUTOR mode. Applies only to that mode
        Returns:
        Optional of external task executor