public class WanThrottlingAcknowledger extends Object implements WanAcknowledger
WanAcknowledger implementation that is meant to be used for
throttling the WAN event stream on the consumer side. Throttling is
done by testing the health condition of the given WAN consumer member
to prevent it getting overloaded by the WAN publisher. The health
condition check is performed by comparing the number of the pending
invocations on the consumer node against a configurable threshold. If
the threshold is exceeded the acknowledgement is delayed and the
condition will be evaluated later again. Since the publisher
waits with sending the next batch to the same WAN target endpoint
until the previously sent one is acknowledged, this implementation
slows down the publisher to the desired level.| Constructor and Description |
|---|
WanThrottlingAcknowledger(com.hazelcast.instance.Node node,
int invocationThreshold) |
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeFailure(com.hazelcast.spi.Operation operation)
Acknowledges the WAN operation as failed operation.
|
void |
acknowledgeSuccess(com.hazelcast.spi.Operation operation)
Acknowledges the WAN operation as successful operation.
|
public WanThrottlingAcknowledger(com.hazelcast.instance.Node node,
int invocationThreshold)
public void acknowledgeSuccess(com.hazelcast.spi.Operation operation)
WanAcknowledgeracknowledgeSuccess in interface WanAcknowledgeroperation - the WAN operation to acknowledgepublic void acknowledgeFailure(com.hazelcast.spi.Operation operation)
WanAcknowledgeracknowledgeFailure in interface WanAcknowledgeroperation - the WAN operation to acknowledgeCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.