|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.devexperts.qd.logger.LoggedObject
com.devexperts.qd.logger.LoggedDataProvider
com.devexperts.qd.logger.LoggedAgent
public class LoggedAgent
Field Summary |
---|
Fields inherited from class com.devexperts.qd.logger.LoggedObject |
---|
log, name |
Constructor Summary | |
---|---|
LoggedAgent(QDLog log,
java.lang.String name,
QDAgent delegate,
DataScheme scheme)
|
Method Summary | |
---|---|
void |
addSubscription(SubscriptionIterator iterator)
Adds specified subscription to this agent's data interest. |
void |
close()
Closes this agent and releases allocated resources in its QDCollector . |
boolean |
examineSubscription(SubscriptionVisitor visitor)
Examines subscription and passes it to the visitor. |
SubscriptionConsumer |
getAddingSubscriptionConsumer()
Returns subscription consumer that can be used to add subscription. |
SubscriptionConsumer |
getRemovingSubscriptionConsumer()
Returns subscription consumer that can be used to remove subscription. |
QDStats |
getStats()
|
int |
getSubscriptionSize()
Returns subscription size in terms of (record, symbol) pairs. |
boolean |
isSubscribed(DataRecord record,
int cipher,
java.lang.String symbol,
long time)
Returns true if subscribed to the corresponding record and symbol with the
corresponding time. |
void |
removeSubscription(SubscriptionIterator iterator)
Removes specified subscription from this agent's data interest. |
void |
setBufferOverflowStrategy(int max_buffer_size,
boolean drop_oldest,
boolean log_overflow)
Sets new strategy for handling of stream and history buffer overflow events. |
void |
setStreamOverflowStrategy(int max_buffer_size,
boolean drop_oldest,
boolean log_overflow)
Sets new strategy for handling of stream and history buffer overflow events. |
void |
setSubscription(SubscriptionIterator iterator)
Sets specified subscription to be this agent's data interest. |
Methods inherited from class com.devexperts.qd.logger.LoggedDataProvider |
---|
retrieveData, setDataListener |
Methods inherited from class com.devexperts.qd.logger.LoggedObject |
---|
child, debug, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.devexperts.qd.DataProvider |
---|
retrieveData, setDataListener |
Constructor Detail |
---|
public LoggedAgent(QDLog log, java.lang.String name, QDAgent delegate, DataScheme scheme)
Method Detail |
---|
public SubscriptionConsumer getAddingSubscriptionConsumer()
QDAgent
QDAgent.addSubscription(com.devexperts.qd.SubscriptionIterator)
method.
getAddingSubscriptionConsumer
in interface QDAgent
public SubscriptionConsumer getRemovingSubscriptionConsumer()
QDAgent
QDAgent.removeSubscription(com.devexperts.qd.SubscriptionIterator)
method.
getRemovingSubscriptionConsumer
in interface QDAgent
public void addSubscription(SubscriptionIterator iterator)
QDAgent
addSubscription
in interface QDAgent
public void removeSubscription(SubscriptionIterator iterator)
QDAgent
removeSubscription
in interface QDAgent
public void setSubscription(SubscriptionIterator iterator)
QDAgent
setSubscription
in interface QDAgent
public void close()
QDAgent
QDCollector
.
Closed agent can not be activated again and shall not be used anymore.
Attempt to use closed agent will result in no action - subscription
will be ignored and data retrieval will retrieve no data.
close
in interface QDAgent
public QDStats getStats()
getStats
in interface QDStatsContainer
public boolean isSubscribed(DataRecord record, int cipher, java.lang.String symbol, long time)
SubscriptionContainer
true
if subscribed to the corresponding record and symbol with the
corresponding time. Non-historic (stream and ticker) QD ignores time parameter.
Note: Check by time in history is not guaranteed yet
(may transiently give wrong result), because it performs unsynchronized
read on two ints to get time from internal data structure.
In history it is guaranteed to work properly only when time parameter is set to
Long.MAX_VALUE
.
isSubscribed
in interface SubscriptionContainer
public boolean examineSubscription(SubscriptionVisitor visitor)
SubscriptionContainer
true
if not all subscription was examined or
false
otherwise.
Note: Visited subscription time in history is not guaranteed yet (may transiently give wrong result), because it performs unsynchronized read on two ints to get time from internal data structure.
examineSubscription
in interface SubscriptionContainer
public int getSubscriptionSize()
SubscriptionContainer
getSubscriptionSize
in interface SubscriptionContainer
public void setStreamOverflowStrategy(int max_buffer_size, boolean drop_oldest, boolean log_overflow)
QDAgent
setStreamOverflowStrategy
in interface QDAgent
max_buffer_size
- how many records to keep in buffer, default is 1000000drop_oldest
- which record shall be dropped - oldest (true) or newest (false), default is truelog_overflow
- whether overflow event shall be logged or not, default is truepublic void setBufferOverflowStrategy(int max_buffer_size, boolean drop_oldest, boolean log_overflow)
QDAgent
setBufferOverflowStrategy
in interface QDAgent
max_buffer_size
- how many records to keep in buffer, default is 1000000drop_oldest
- which record shall be dropped - oldest (true) or newest (false), default is truelog_overflow
- whether overflow event shall be logged or not, default is true
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |