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 DistributionQueues 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
DistributionQueueDispatchingStrategyDistributionPackage
to one or more DistributionQueues provided by the given DistributionQueueProvideradd in interface DistributionQueueDispatchingStrategydistributionPackage - a DistributionPackage to distributequeueProvider - the DistributionQueueProvider used to provide the queues to be used for the given packageIterable of DistributionQueueItemStatuss representing
the states of the DistributionQueueItems added to one or more DistributionQueuesDistributionException - if any internal error happens during distribution@NotNull public @NotNull List<String> getQueueNames()
DistributionQueueDispatchingStrategygetQueueNames in interface DistributionQueueDispatchingStrategyCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.