public class DynamicChannelShaper extends ChannelShaper implements QDFilter.UpdateListener
Constructor and Description |
---|
DynamicChannelShaper(QDContract contract,
Executor subscriptionExecutor,
QDFilter subscriptionFilter) |
Modifier and Type | Method and Description |
---|---|
DynamicChannelShaper |
clone() |
void |
close()
Closes this channel shaper and releases its resources (stops tracking dynamic filters).
|
void |
filterUpdated(QDFilter filter)
This method is fired at most once is a lifetime of a
dynamic filter when
it updates. |
void |
setSubscriptionFilter(QDFilter subscriptionFilter)
Sets subscription filter for the channel.
|
void |
updateFilter() |
getAggregationPeriod, getCollector, getContract, getDataFilter, getSubscriptionExecutor, getSubscriptionFilter, getWeight, hasSubscriptionExecutor, isKeepRejected, setAggregationPeriod, setCollector, setDataFilter, setSubscriptionFilter, setWeight
public DynamicChannelShaper(QDContract contract, Executor subscriptionExecutor, QDFilter subscriptionFilter)
public DynamicChannelShaper clone()
clone
in class ChannelShaper
public void setSubscriptionFilter(QDFilter subscriptionFilter)
ChannelShaper
QDFilter.ANYTHING
to accept any subscription.
Change of subscription filter will trigger re-creation of agent.setSubscriptionFilter
in class ChannelShaper
subscriptionFilter
- subscription filter;
may be null
for backwards-compatibility (it is replaced with QDFilter.ANYTHING
)public void updateFilter()
public void filterUpdated(QDFilter filter)
QDFilter.UpdateListener
dynamic
filter when
it updates. The new value of the filter shall be retrieved with QDFilter.getUpdatedFilter()
method.
This method is never called under synchronization on any filter to avoid deadlocks.filterUpdated
in interface QDFilter.UpdateListener
filter
- The filter that was updated. Use filter.getUpdateFilter()
to get the new instance of
the updated filter.public void close()
ChannelShaper
close
in class ChannelShaper
Copyright © 2002–2025 Devexperts LLC. All rights reserved.