本文整理了Java中com.thomsonreuters.upa.codec.Qos
类的一些代码示例,展示了Qos
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Qos
类的具体详情如下:
包路径:com.thomsonreuters.upa.codec.Qos
类名称:Qos
[英]UPA Quality of Service class contains information rate and/or timeliness information. Timeliness conveys information about the age of data. Rate conveys information about the data's period of change. Some timeliness or rate values may allow for additional time or rate information to be provided. A consumer can use RequestMsg to indicate the desired QoS for its streams. This can be a request for a specific QoS or a range of qualities of service, where any value within the range will satisfy the request. The RefreshMsg includes QoS used to indicate the QoS being provided for a stream. When issuing a request, the QoS specified on the request typically matches the advertised QoS of the service, as conveyed via the Source Directory domain model.
Any QoS within the range, inclusive of the specified qos and worstQos, will satisfy the request. If a provider cannot provide a QoS within the range, the provider should reject the request. When a provider responds to an initial request, the RefreshMsg#qos() should contain the actual QoS being provided to the stream. Subsequent requests should not specify a range as the QoS has been established for the stream. Because QoS information is mostly optional on a RequestMsg (Some components may require qos on initial request and reissue messages):
代码示例来源:origin: Refinitiv/Elektron-SDK
void decode(com.thomsonreuters.upa.codec.Qos rsslQos)
{
if (rsslQos != null)
{
_dataCode = DataCode.NO_CODE;
_rsslQos.rate(rsslQos.rate());
_rsslQos.timeliness(rsslQos.timeliness());
_rsslQos.dynamic(rsslQos.isDynamic());
_rsslQos.timeInfo(rsslQos.timeInfo());
_rsslQos.rateInfo(rsslQos.rateInfo());
}
else
{
_dataCode = DataCode.BLANK;
_rsslQos.clear();
}
}
代码示例来源:origin: Refinitiv/Elektron-SDK
if (serviceQos.equals(qos))
serviceQos.copy(matchedQos);
break;
if (serviceQos.isInRange(qos, worstQos))
if (serviceQos.isBetter(matchedQos))
serviceQos.copy(matchedQos);
ret = _defaultQos.equals(qos);
ret = _defaultQos.isInRange(qos, worstQos);
_defaultQos.copy(matchedQos);
matchedQos.dynamic(qos.isDynamic());
代码示例来源:origin: Refinitiv/Elektron-SDK
@Override
void decode(com.thomsonreuters.upa.codec.Buffer rsslBuffer, com.thomsonreuters.upa.codec.DecodeIterator dIter)
{
_rsslBuffer = rsslBuffer;
if (com.thomsonreuters.upa.codec.CodecReturnCodes.SUCCESS == _rsslQos.decode(dIter))
_dataCode = DataCode.NO_CODE;
else
{
_dataCode = DataCode.BLANK;
_rsslQos.clear();
}
}
代码示例来源:origin: Refinitiv/Elektron-SDK
@Override
public int timeliness()
{
int timeliness = OmmQos.Timeliness.INEXACT_DELAYED;
switch( _rsslQos.timeliness() )
{
case com.thomsonreuters.upa.codec.QosTimeliness.REALTIME:
timeliness = OmmQos.Timeliness.REALTIME;
break;
case com.thomsonreuters.upa.codec.QosTimeliness.DELAYED_UNKNOWN :
timeliness = OmmQos.Timeliness.INEXACT_DELAYED;
break;
case com.thomsonreuters.upa.codec.QosTimeliness.DELAYED:
timeliness = _rsslQos.timeInfo();
break;
default:
break;
}
return timeliness;
}
代码示例来源:origin: Refinitiv/Elektron-SDK
/**
* Instantiates a new directory provider.
*/
public DirectoryProvider()
{
_directoryRefresh = (DirectoryRefresh)DirectoryMsgFactory.createMsg();
_directoryRefresh.rdmMsgType(DirectoryMsgType.REFRESH);
_service = DirectoryMsgFactory.createService();
_qos = CodecFactory.createQos();
_directoryRefresh.rdmMsgType(DirectoryMsgType.REFRESH);
_qos.dynamic(false);
_qos.rate(QosRates.TICK_BY_TICK);
_qos.timeliness(QosTimeliness.REALTIME);
_encodeIter = CodecFactory.createEncodeIterator();
}
代码示例来源:origin: Refinitiv/Elektron-SDK
chnlInfo.symbolListHandler.qos().dynamic(qos.isDynamic());
chnlInfo.symbolListHandler.qos().rate(qos.rate());
chnlInfo.symbolListHandler.qos().timeliness(qos.timeliness());
chnlInfo.symbolListHandler.qos().dynamic(false);
chnlInfo.symbolListHandler.qos().rate(QosRates.TICK_BY_TICK);
chnlInfo.symbolListHandler.qos().timeliness(QosTimeliness.REALTIME);
代码示例来源:origin: Refinitiv/Elektron-SDK
retval = qoS.decode(dIter);
if (retval != CodecReturnCodes.SUCCESS && retval != CodecReturnCodes.BLANK_DATA)
qoS.copy(serviceQos);
serviceDiscoveryInfo_qoS.add(serviceQos);
serviceDiscoveryInfo_qoS.get(arrayCount).timeliness(QosTimeliness.REALTIME);
serviceDiscoveryInfo_qoS.get(arrayCount).rate(QosRates.TICK_BY_TICK);
serviceDiscoveryInfo_qoS.get(arrayCount).dynamic(false);
代码示例来源:origin: Refinitiv/Elektron-SDK
assertFalse(qos1.isBetter(qos2));
qos1.rate(QosRates.TICK_BY_TICK);
assertTrue(qos1.isBetter(qos2));
qos1.clear();
assertFalse(qos1.isBetter(qos2));
qos1.rate(QosRates.JIT_CONFLATED);
assertTrue(qos1.isBetter(qos2));
qos1.clear();
assertFalse(qos1.isBetter(qos2));
qos1.rate(QosRates.TIME_CONFLATED);
assertTrue(qos1.isBetter(qos2));
qos1.clear();
assertFalse(qos1.isBetter(qos2));
qos1.timeliness(QosTimeliness.REALTIME);
assertTrue(qos1.isBetter(qos2));
qos1.clear();
assertFalse(qos1.isBetter(qos2));
qos1.timeliness(QosTimeliness.DELAYED_UNKNOWN);
assertTrue(qos1.isBetter(qos2));
qos1.clear();
assertFalse(qos1.isBetter(qos2));
qos1.timeliness(QosTimeliness.DELAYED);
assertTrue(qos1.isBetter(qos2));
qos1.clear();
assertFalse(qos1.isBetter(qos2));
qos1.rate(QosRates.TIME_CONFLATED);
qos1.rateInfo(1000);
assertTrue(qos1.isBetter(qos2));
qos1.clear();
代码示例来源:origin: Refinitiv/Elektron-SDK
providerQos.clear();
providerQos.dynamic(false); /* @brief If _TRUE, Qos is dynamic (used to describe the changeability of the quality of service, typically over the life of a data stream) */
providerQos.rate(QosRates.TICK_BY_TICK);/* Rate is Tick By Tick, indicates every change to information is conveyed */
providerQos.timeliness(QosTimeliness.REALTIME);/* Timeliness is Realtime, indicates information is updated as soon as new information becomes available */
代码示例来源:origin: Refinitiv/Elektron-SDK
if ( qosList.get(index).isInRange(requestMsg.qos(), requestMsg.worstQos()))
qos.rate(QosRates.TICK_BY_TICK);
qos.timeliness(QosTimeliness.REALTIME);
if ( qos.isInRange(requestMsg.qos(), requestMsg.worstQos()))
if ( qosList.get(index).equals(requestMsg.qos()) )
qos.rate(QosRates.TICK_BY_TICK);
qos.timeliness(QosTimeliness.REALTIME);
if ( qos.equals(requestMsg.qos()) )
qos.rate(QosRates.TICK_BY_TICK);
qos.timeliness(QosTimeliness.REALTIME);
if ( qosList.get(index).equals(qos) )
代码示例来源:origin: Refinitiv/Elektron-SDK
@Override
public int rate()
{
int rate = OmmQos.Rate.JUST_IN_TIME_CONFLATED;
switch( _rsslQos.rate() )
{
case com.thomsonreuters.upa.codec.QosRates.TICK_BY_TICK:
rate = OmmQos.Rate.TICK_BY_TICK;
break;
case com.thomsonreuters.upa.codec.QosRates.JIT_CONFLATED:
rate = OmmQos.Rate.JUST_IN_TIME_CONFLATED;
break;
case com.thomsonreuters.upa.codec.QosRates.TIME_CONFLATED:
rate = _rsslQos.rateInfo();
break;
default:
break;
}
return rate;
}
代码示例来源:origin: Refinitiv/Elektron-SDK
WlItemHandler(Watchlist watchlist)
{
_watchlist = watchlist;
_defaultQos.clear();
_defaultQos.timeliness(QosTimeliness.REALTIME);
_defaultQos.rate(QosRates.TICK_BY_TICK);
_statusMsg.msgClass(MsgClasses.STATUS);
_wlViewHandler = new WlViewHandler(watchlist);
_itemAggregationKeytoWlStreamTable = new HashMap<WlItemAggregationKey,WlStream>(_watchlist.role().watchlistOptions().itemCountHint() + 10, 1);
}
代码示例来源:origin: Refinitiv/Elektron-SDK
assertEquals(false, msg.qos().isDynamic());
assertEquals(QosTimeliness.REALTIME, msg.qos().timeliness());
assertEquals(QosRates.TICK_BY_TICK, msg.qos().rate());
代码示例来源:origin: Refinitiv/Elektron-SDK
(msg.flags() & RequestMsgFlags.HAS_QOS) != 0)
if (!((RequestMsg)msg).qos().isInRange(((RequestMsg)msg).worstQos(), _providerQos))
if (!((RequestMsg)msg).qos().equals(_providerQos))
代码示例来源:origin: Refinitiv/Elektron-SDK
void clear()
{
_dataCode = DataCode.NO_CODE;
_rsslQos.clear();
}
}
代码示例来源:origin: Refinitiv/Elektron-SDK
ret = fidQosValue.decode(dIter);
if (ret == CodecReturnCodes.SUCCESS)
fieldValue.append(fidQosValue.toString());
代码示例来源:origin: Refinitiv/Elektron-SDK
(requestMsg.qos().timeliness() == QosTimeliness.UNSPECIFIED ||
requestMsg.qos().rate() == QosRates.UNSPECIFIED ||
requestMsg.qos().timeliness() > QosTimeliness.DELAYED ||
requestMsg.qos().rate() > QosRates.TIME_CONFLATED))
"Request has invalid QoS (Timeliness: " + requestMsg.qos().timeliness() +
", Rate: " + requestMsg.qos().rate() + ").");
(requestMsg.worstQos().timeliness() == QosTimeliness.UNSPECIFIED ||
requestMsg.worstQos().rate() == QosRates.UNSPECIFIED ||
requestMsg.worstQos().timeliness() > QosTimeliness.DELAYED ||
requestMsg.worstQos().rate() > QosRates.TIME_CONFLATED))
"Request has invalid worst QoS (Timeliness: " + requestMsg.worstQos().timeliness() +
", Rate: " + requestMsg.worstQos().rate() + ").");
代码示例来源:origin: Refinitiv/Elektron-SDK
assertFalse(qos.isInRange(bestQos, worstQos));
((QosImpl)qos)._rate = QosRates.TIME_CONFLATED;
((QosImpl)qos)._rateInfo = 65531;
((QosImpl)qos)._timeliness = QosTimeliness.DELAYED;
((QosImpl)qos)._timeInfo = 65532;
assertFalse(qos.isInRange(bestQos, worstQos));
((QosImpl)qos)._rate = QosRates.TIME_CONFLATED;
((QosImpl)qos)._rateInfo = 65535;
((QosImpl)qos)._timeliness = QosTimeliness.DELAYED;
((QosImpl)qos)._timeInfo = 65536;
assertFalse(qos.isInRange(bestQos, worstQos));
qos.clear();
assertFalse(qos.isInRange(bestQos, worstQos));
((QosImpl)qos)._rate = QosRates.TIME_CONFLATED;
((QosImpl)qos)._rateInfo = 65532;
((QosImpl)qos)._timeliness = QosTimeliness.DELAYED;
((QosImpl)qos)._timeInfo = 65533;
assertTrue(qos.isInRange(bestQos, worstQos));
qos.clear();
assertFalse(qos.isInRange(bestQos, worstQos));
((QosImpl)qos)._rate = QosRates.TIME_CONFLATED;
((QosImpl)qos)._rateInfo = 65533;
((QosImpl)qos)._timeliness = QosTimeliness.DELAYED;
((QosImpl)qos)._timeInfo = 65534;
assertTrue(qos.isInRange(bestQos, worstQos));
qos.clear();
assertFalse(qos.isInRange(bestQos, worstQos));
((QosImpl)qos)._rate = QosRates.TIME_CONFLATED;
((QosImpl)qos)._rateInfo = 65534;
代码示例来源:origin: Refinitiv/Elektron-SDK
break;
case DataTypes.QOS:
if ((ret = _fidQosValue.decode(iter)) < CodecReturnCodes.SUCCESS)
return ret;
break;
代码示例来源:origin: Refinitiv/Elektron-SDK
if (bestQos.equals(worstQos))
return bestQos.equals(this);
内容来源于网络,如有侵权,请联系作者删除!