public final class DeliveryBuilder
extends java.lang.Object
Delivery
instances.Modifier and Type | Method and Description |
---|---|
Delivery |
build() |
java.util.Optional<java.lang.Integer> |
catchUpPageSize()
Returns the value of the configured catch-up page size or
Optional.empty()
if no such value was configured. |
java.util.Optional<CatchUpStorage> |
catchUpStorage()
Returns the value of the configured
CatchUpStorage or Optional.empty() if no
such value was configured. |
java.util.Optional<com.google.protobuf.Duration> |
deduplicationWindow()
Returns the value of the configured deduplication window or
Optional.empty()
if no such value was configured. |
java.util.Optional<DeliveryMonitor> |
deliveryMonitor()
Returns the value of the configured
DeliveryMonitor or Optional.empty()
if no such value was configured. |
java.util.Optional<InboxStorage> |
inboxStorage()
Returns the value of the configured
InboxStorage or Optional.empty() if no
such value was configured. |
java.util.Optional<java.lang.Integer> |
pageSize()
Returns the value of the configured page size or
Optional.empty()
if no such value was configured. |
DeliveryBuilder |
setCatchUpPageSize(int catchUpPageSize)
Sets the maximum number of events to read from an event store per single read operation
during the catch-up.
|
DeliveryBuilder |
setCatchUpStorage(CatchUpStorage catchUpStorage)
Sets the custom
CatchUpStorage . |
DeliveryBuilder |
setDeduplicationWindow(com.google.protobuf.Duration deduplicationWindow)
Sets for how long the previously delivered messages should be kept in the
Inbox
to ensure the incoming messages aren't duplicates. |
DeliveryBuilder |
setInboxStorage(InboxStorage inboxStorage)
Sets the custom
InboxStorage . |
DeliveryBuilder |
setMonitor(DeliveryMonitor monitor)
Sets the custom
DeliveryMonitor . |
DeliveryBuilder |
setPageSize(int pageSize)
Sets the maximum amount of messages to deliver within a
DeliveryStage . |
DeliveryBuilder |
setStrategy(DeliveryStrategy strategy)
Sets strategy of assigning a shard index for a message that is delivered to a particular
target.
|
DeliveryBuilder |
setWorkRegistry(ShardedWorkRegistry workRegistry) |
java.util.Optional<DeliveryStrategy> |
strategy()
Returns the value of the configured
DeliveryStrategy or Optional.empty()
if no such value was configured. |
java.util.Optional<ShardedWorkRegistry> |
workRegistry()
Returns the value of the configured
ShardedWorkRegistry or Optional.empty()
if no such value was configured. |
public java.util.Optional<InboxStorage> inboxStorage()
InboxStorage
or Optional.empty()
if no
such value was configured.public java.util.Optional<CatchUpStorage> catchUpStorage()
CatchUpStorage
or Optional.empty()
if no
such value was configured.public java.util.Optional<DeliveryStrategy> strategy()
DeliveryStrategy
or Optional.empty()
if no such value was configured.public java.util.Optional<ShardedWorkRegistry> workRegistry()
ShardedWorkRegistry
or Optional.empty()
if no such value was configured.public java.util.Optional<com.google.protobuf.Duration> deduplicationWindow()
Optional.empty()
if no such value was configured.public java.util.Optional<DeliveryMonitor> deliveryMonitor()
DeliveryMonitor
or Optional.empty()
if no such value was configured.public java.util.Optional<java.lang.Integer> pageSize()
Optional.empty()
if no such value was configured.public java.util.Optional<java.lang.Integer> catchUpPageSize()
Optional.empty()
if no such value was configured.@CanIgnoreReturnValue public DeliveryBuilder setWorkRegistry(ShardedWorkRegistry workRegistry)
@CanIgnoreReturnValue public DeliveryBuilder setStrategy(DeliveryStrategy strategy)
If none set, UniformAcrossAllShards.singleShard()
is be used.
@CanIgnoreReturnValue public DeliveryBuilder setDeduplicationWindow(com.google.protobuf.Duration deduplicationWindow)
Inbox
to ensure the incoming messages aren't duplicates.
If none set, zero duration is used.
@CanIgnoreReturnValue public DeliveryBuilder setInboxStorage(InboxStorage inboxStorage)
InboxStorage
.
If none set, the storage is initialized by the StorageFactory
specific for
this ServerEnvironment
.
If no StorageFactory
is present in the ServerEnvironment
, a new
InMemoryStorageFactory
is used.
@CanIgnoreReturnValue public DeliveryBuilder setCatchUpStorage(CatchUpStorage catchUpStorage)
CatchUpStorage
.
If none set, the storage is initialized by the StorageFactory
specific for
this ServerEnvironment
.
If no StorageFactory
is present in the ServerEnvironment
, a new
InMemoryStorageFactory
is used.
@CanIgnoreReturnValue public DeliveryBuilder setMonitor(DeliveryMonitor monitor)
DeliveryMonitor
.
If none set, DeliveryMonitor.alwaysContinue()
is used.
@CanIgnoreReturnValue public DeliveryBuilder setPageSize(int pageSize)
DeliveryStage
.
If none set, DeliveryBuilder.DEFAULT_PAGE_SIZE is used.
@CanIgnoreReturnValue public DeliveryBuilder setCatchUpPageSize(int catchUpPageSize)
If none set, DeliveryBuilder.DEFAULT_CATCH_UP_PAGE_SIZE is used.
public Delivery build()