Interface BufferBuilder<R,T,U extends 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 BlockingQueue<PushEvent<? extends T>>>
Create a buffered section of a Push-based stream
  • Method Details

    • withBuffer

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

      BufferBuilder<R,T,U> withQueuePolicy(QueuePolicy<T,U> queuePolicy)
      Set the QueuePolicy of this Builder
      Parameters:
      queuePolicy -
      Returns:
      this builder
    • withQueuePolicy

      BufferBuilder<R,T,U> withQueuePolicy(QueuePolicyOption queuePolicyOption)
      Set the QueuePolicy of this Builder
      Parameters:
      queuePolicyOption -
      Returns:
      this builder
    • withPushbackPolicy

      BufferBuilder<R,T,U> withPushbackPolicy(PushbackPolicy<T,U> pushbackPolicy)
      Set the PushbackPolicy of this builder
      Parameters:
      pushbackPolicy -
      Returns:
      this builder
    • withPushbackPolicy

      BufferBuilder<R,T,U> withPushbackPolicy(PushbackPolicyOption pushbackPolicyOption, long time)
      Set the PushbackPolicy of this builder
      Parameters:
      pushbackPolicyOption -
      time -
      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(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(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