public class AsyncDeliveryDispatchingStrategy extends Object implements DistributionQueueDispatchingStrategy
MAX_QUEUE_ITEMS_THRESHOLD
),
in such a case a reference package is created and put into that queue while the actual package is sent using a different
queue for storage at the receiving side so that it'll be installed only once the reference is processed.
This guarantees delivery order while maximizing the network throughput when there're many items in the queues.DEFAULT_QUEUE_NAME
Constructor and Description |
---|
AsyncDeliveryDispatchingStrategy(Map<String,String> deliveryMappings)
create an async delivery strategy
|
Modifier and Type | Method and Description |
---|---|
Iterable<DistributionQueueItemStatus> |
add(@NotNull DistributionPackage distributionPackage,
@NotNull DistributionQueueProvider queueProvider)
synchronously distribute a
DistributionPackage
to one or more DistributionQueue s provided by the given DistributionQueueProvider |
@NotNull List<String> |
getQueueNames()
Returns the queue names available for this strategy.
|
public Iterable<DistributionQueueItemStatus> add(@NotNull @NotNull DistributionPackage distributionPackage, @NotNull @NotNull DistributionQueueProvider queueProvider) throws DistributionException
DistributionQueueDispatchingStrategy
DistributionPackage
to one or more DistributionQueue
s provided by the given DistributionQueueProvider
add
in interface DistributionQueueDispatchingStrategy
distributionPackage
- a DistributionPackage
to distributequeueProvider
- the DistributionQueueProvider
used to provide the queues to be used for the given packageIterable
of DistributionQueueItemStatus
s representing
the states of the DistributionQueueItem
s added to one or more DistributionQueue
sDistributionException
- if any internal error happens during distribution@NotNull public @NotNull List<String> getQueueNames()
DistributionQueueDispatchingStrategy
getQueueNames
in interface DistributionQueueDispatchingStrategy
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.