public static interface AgentChannels.Owner
recordsAvailable()
method. Other methods are necessary for creating
and configuring the agent inside the channel.Modifier and Type | Method and Description |
---|---|
QDAgent |
createAgent(QDCollector collector,
QDFilter filter)
This method is used internally by agent adapter to create agent for the corresponding
collector, filter when the corresponding subscription arrives for a first time.
|
QDAgent |
createVoidAgent(QDContract contract)
This method is used to create void agent just to keep subscription.
|
QDFilter |
getPeerFilter(QDContract contract)
When the channel configuration is updated, it will be summarized by logical AND with the filter that is specified
in shaper.
|
void |
recordsAvailable()
Notifies the owner when records are available.
|
boolean |
retrieveData(DataProvider dataProvider,
QDContract contract)
Retrieves accumulated data from data provider.
|
QDAgent createAgent(QDCollector collector, QDFilter filter)
this
adapter's lock.
This implementation returns collector.createAgent(filter, keyProperties)
.
This method may be overriden to create agent with other filter, otherwise customize the agent
that is being created, or to keep track of created agents.collector
- collector to create agent forfilter
- subscription filter for the agentQDAgent createVoidAgent(QDContract contract)
contract
- contract to create agent forQDFilter getPeerFilter(QDContract contract)
contract
- - contract specified in the shapervoid recordsAvailable()
This method is called by AgentChannel to notify the owner that records are available. It is important to note
that AgentChannel is designed not to call this method unnecessarily. If it is called, it expects that the
data will be retrieved from the collector using the AgentChannels.retrieveData()
method.
If the aggregationPeriod is set, this method will be called only the first time. Subsequently, you must
manually calculate the next retrieval time using AgentChannels.nextRetrieveTime(long)
after each data retrieval.
If there has been no data available for an extended period, AgentChannels.nextRetrieveTime(long)
will return
Long.MAX_VALUE
, indicating that you must wait for the recordsAvailable notification to occur again.
boolean retrieveData(DataProvider dataProvider, QDContract contract)
true
if some data still remains in the provider
or false
if all accumulated data were retrieved.Copyright © 2002–2025 Devexperts LLC. All rights reserved.