Interface BufferBuilder<R,​T,​U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>

  • Type Parameters:
    R - The type of object being built
    T - The type of objects in the PushEvent
    U - The type of the Queue used in the user specified buffer
    All Known Subinterfaces:
    PushStreamBuilder<T,​U>

    @ProviderType
    public interface BufferBuilder<R,​T,​U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
    Create a buffered section of a Push-based stream
    • Method Detail

      • withBuffer

        BufferBuilder<R,​T,​U> withBuffer​(U queue)
        The BlockingQueue implementation to use as a buffer
        Parameters:
        queue -
        Returns:
        this builder
      • withParallelism

        BufferBuilder<R,​T,​U> withParallelism​(int parallelism)
        Set the maximum permitted number of concurrent event deliveries allowed from this buffer
        Parameters:
        parallelism -
        Returns:
        this builder
      • withExecutor

        BufferBuilder<R,​T,​U> withExecutor​(java.util.concurrent.Executor executor)
        Set the Executor that should be used to deliver events from this buffer
        Parameters:
        executor -
        Returns:
        this builder
      • withScheduler

        BufferBuilder<R,​T,​U> withScheduler​(java.util.concurrent.ScheduledExecutorService scheduler)
        Set the ScheduledExecutorService that should be used to trigger timed events after this buffer
        Parameters:
        scheduler -
        Returns:
        this builder
      • build

        R build()
        Returns:
        the object being built