Class EventStream.Builder
- java.lang.Object
-
- io.streamthoughts.azkarra.api.events.EventStream.Builder
-
- Enclosing class:
- EventStream<K,V>
public static class EventStream.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder(String eventType)
Creates a newEventStream.Builder
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
EventStream<K,V>build()
EventStream.Builder
withMaxBlockingTime(Duration maxBlockingTime)
EventStream.Builder
withQueueLimitHandler(LimitHandler queueLimitHandler)
EventStream.Builder
withQueueSize(int queueSize)
-
-
-
Constructor Detail
-
Builder
public Builder(String eventType)
Creates a newEventStream.Builder
instance.- Parameters:
eventType
- the event-type.
-
-
Method Detail
-
withQueueSize
public EventStream.Builder withQueueSize(int queueSize)
- Parameters:
queueSize
- the queue size.- Returns:
- the
EventStream.Builder
-
withMaxBlockingTime
public EventStream.Builder withMaxBlockingTime(Duration maxBlockingTime)
- Parameters:
maxBlockingTime
- the maximum duration to wait to wait before giving up when the queue is full.- Returns:
- the
EventStream.Builder
-
withQueueLimitHandler
public EventStream.Builder withQueueLimitHandler(LimitHandler queueLimitHandler)
- Parameters:
queueLimitHandler
- the handler to be invoked when the limit queue is reached.- Returns:
- the
EventStream.Builder
-
build
public <K,V> EventStream<K,V> build()
-
-