public class AgentChannels extends Object
processSubscription(com.devexperts.qd.ng.RecordSource, com.devexperts.qd.QDContract, boolean)
, retrieveData()
,
and nextRetrieveTime(long)
, automatically operate on the collection of channels.Modifier and Type | Class and Description |
---|---|
static interface |
AgentChannels.Owner
The Owner interface represents the owner of the agent channels.
|
Constructor and Description |
---|
AgentChannels(AgentChannels.Owner owner,
Collection<ChannelShaper> shapers) |
Modifier and Type | Method and Description |
---|---|
static void |
clearDataInBuffer(RecordBuffer buf,
boolean keepTime) |
void |
close() |
void |
closeAndExamineDataBySubscription(RecordBuffer buf) |
long |
nextRetrieveTime(long currentTime)
Returns the next time when the
retrieveData() method should be called. |
boolean |
processSubscription(RecordSource sub,
QDContract contract,
boolean isSubscriptionAdd)
Processes subscription.
|
boolean |
retrieveData()
Retrieves accumulated messages using the provided RetrieveFromProvider function.
|
public AgentChannels(AgentChannels.Owner owner, Collection<ChannelShaper> shapers)
public static void clearDataInBuffer(RecordBuffer buf, boolean keepTime)
public boolean processSubscription(RecordSource sub, QDContract contract, boolean isSubscriptionAdd)
sub
- the subscriptioncontract
- the QDContractisSubscriptionAdd
- flag indicating whether the subscription is added or removedpublic long nextRetrieveTime(long currentTime)
retrieveData()
method should be called.currentTime
- the current time in milliseconds obtained from System.currentTimeMillis()
retrieveData()
;
returns 0 if data should be retrieved immediately using retrieveData()
,
returns Long.MAX_VALUE
if waiting for AgentChannels.Owner.recordsAvailable()
to be triggered.public boolean retrieveData()
public void close()
public void closeAndExamineDataBySubscription(RecordBuffer buf)
Copyright © 2002–2025 Devexperts LLC. All rights reserved.