void copy(ConsumerWatchlistOptions watchlistOptions) { _enableWatchlist = watchlistOptions.enableWatchlist(); _channelOpenCallback = watchlistOptions.channelOpenCallback(); _itemCountHint = watchlistOptions.itemCountHint(); _obeyOpenWindow = watchlistOptions.obeyOpenWindow(); _maxOutstandingPosts = watchlistOptions.maxOutstandingPosts(); _postAckTimeout = watchlistOptions.postAckTimeout(); _requestTimeout = watchlistOptions.requestTimeout(); } }
ConsumerRole createWatchlistConsumerRole(ReactorCallbackHandler callbackHandler) { ConsumerRole consumerRole = ReactorFactory.createConsumerRole(); assertNotNull(consumerRole); assertNotNull(callbackHandler); consumerRole.defaultMsgCallback(callbackHandler); consumerRole.channelEventCallback(callbackHandler); consumerRole.loginMsgCallback(callbackHandler); consumerRole.directoryMsgCallback(callbackHandler); consumerRole.dictionaryMsgCallback(callbackHandler); consumerRole.watchlistOptions().enableWatchlist(true); consumerRole.watchlistOptions().obeyOpenWindow(true); consumerRole.watchlistOptions().channelOpenCallback(callbackHandler); return consumerRole; }
chnlInfo.consumerRole.loginMsgCallback(this); chnlInfo.consumerRole.directoryMsgCallback(this); chnlInfo.consumerRole.watchlistOptions().enableWatchlist(true); chnlInfo.consumerRole.watchlistOptions().itemCountHint(4); chnlInfo.consumerRole.watchlistOptions().maxOutstandingPosts(5); chnlInfo.consumerRole.watchlistOptions().obeyOpenWindow(true); chnlInfo.consumerRole.watchlistOptions().channelOpenCallback(this);
_role.watchlistOptions().enableWatchlist(true); _role.watchlistOptions().itemCountHint(_consPerfConfig.itemRequestCount()); _role.watchlistOptions().requestTimeout(0);
!((ConsumerRole)reactorChannel.role()).watchlistOptions().enableWatchlist())
&& ((ConsumerRole)role).watchlistOptions().enableWatchlist()) ((ConsumerRole)role).watchlistOptions().enableWatchlist()) if (((ConsumerRole)role).watchlistOptions().channelOpenCallback() != null)
int startRequestTimer(ReactorErrorInfo errorInfo) { int ret = ReactorReturnCodes.SUCCESS; _requestPending = true; if (_watchlist.watchlistOptions().requestTimeout() > 0) { _requestExpireTime = (_watchlist.watchlistOptions().requestTimeout() * 1000000L) + System.nanoTime(); ret = _watchlist.startWatchlistTimer(_requestExpireTime, this, errorInfo); } return ret; }
consumerRole.watchlistOptions().postAckTimeout(5000); postMsg.clear(); postMsg.msgClass(MsgClasses.POST); watchlist.watchlistOptions().maxOutstandingPosts(0); assertEquals(ReactorReturnCodes.INVALID_USAGE, event.reactorChannel().submit(postMsg, submitOptions, errorInfo));
Watchlist(ReactorChannel reactorChannel, ConsumerRole consumerRole) { _reactorChannel = reactorChannel; _reactor = _reactorChannel.reactor(); _role = consumerRole; _watchlistOptions = _role.watchlistOptions(); if (_watchlistOptions.itemCountHint() > 0) { _streamIdtoWlRequestTable = new HashMap<WlInteger,WlRequest>(_watchlistOptions.itemCountHint() + 10, 1); _streamIdtoWlStreamTable = new HashMap<WlInteger,WlStream>(_watchlistOptions.itemCountHint() + 10, 1); } else { _streamIdtoWlRequestTable = new HashMap<WlInteger,WlRequest>(); _streamIdtoWlStreamTable = new HashMap<WlInteger,WlStream>(); } _loginHandler = new WlLoginHandler(this); _directoryHandler = new WlDirectoryHandler(this); _itemHandler = new WlItemHandler(this); _tempByteBuffer1 = ByteBuffer.allocate(8192); _tempBuffer1.data(_tempByteBuffer1); _tempByteBuffer2 = ByteBuffer.allocate(8192); _tempBuffer2.data(_tempByteBuffer2); }
long postExpireTime = (_watchlist.watchlistOptions().postAckTimeout() * 1000000L) + System.nanoTime(); if (_watchlist.startWatchlistTimer(postExpireTime, this, errorInfo) != ReactorReturnCodes.SUCCESS)
consumerRole.dictionaryMsgCallback(consumer); consumerRole.defaultMsgCallback(consumer); consumerRole.watchlistOptions().channelOpenCallback(consumer);
boolean isWindowOpen(WlService wlService) { boolean ret = true; if (_watchlist.watchlistOptions().obeyOpenWindow() && wlService.rdmService().checkHasLoad() && wlService.rdmService().load().checkHasOpenWindow()) { long openWindow = wlService.rdmService().load().openWindow(); if (openWindow == 0 || // open window of 0 means window is not open wlService.numOutstandingRequests() == openWindow) { ret = false; } } return ret; }
if (_watchlist.numOutstandingPosts() < _watchlist.watchlistOptions().maxOutstandingPosts())
assertEquals(1, consumerCallbackHandler._rdmDictionaryMsgCallbackCount); consumerRole.watchlistOptions().enableWatchlist(true); consumerRole.watchlistOptions().itemCountHint(4); consumerRole.watchlistOptions().maxOutstandingPosts(5); consumerRole.watchlistOptions().obeyOpenWindow(true); consumerRole.watchlistOptions().channelOpenCallback(consumerCallbackHandler); assertEquals(ReactorCallbackReturnCodes.SUCCESS, consumerRole.watchlistOptions().channelOpenCallback().reactorChannelEventCallback(reactorChannelEvent)); assertEquals(2, consumerCallbackHandler._reactorChannelEventCallbackCount); assertTrue(consumerRole.watchlistOptions().enableWatchlist()); assertEquals(4, consumerRole.watchlistOptions().itemCountHint()); assertEquals(5, consumerRole.watchlistOptions().maxOutstandingPosts()); assertTrue(consumerRole.watchlistOptions().obeyOpenWindow());
consumerRole.dictionaryMsgCallback(consumer); consumerRole.defaultMsgCallback(consumer); consumerRole.watchlistOptions().enableWatchlist(_enableWatchlist);
|| consumerRole.watchlistOptions().enableWatchlist() == true || consumerRole.rdmDirectoryRequest() != null); if (consumerRole.watchlistOptions().enableWatchlist() && consumerRole.watchlistOptions().channelOpenCallback() != null && recoveringChannel == false) if (consumerRole.rdmDirectoryRequest() == null && consumerRole.watchlistOptions().enableWatchlist() == false) consumer.testReactor().dispatch(2); else assertEquals(LoginMsgType.REFRESH, loginMsgEvent.rdmLoginMsg().rdmMsgType()); if (consumerRole.rdmDirectoryRequest() == null && consumerRole.watchlistOptions().enableWatchlist() == false) if (consumerRole.watchlistOptions().enableWatchlist() == false) return; if (opts.setupDefaultDirectoryStream() == false && consumerRole.watchlistOptions().enableWatchlist() == false) return; if (!recoveringChannel || consumerRole.watchlistOptions().enableWatchlist() == false) assertEquals(DirectoryMsgType.REFRESH, directoryMsgEvent.rdmDirectoryMsg().rdmMsgType()); else
consumerRole.initDefaultRDMLoginRequest(); consumerRole.initDefaultRDMDirectoryRequest(); consumerRole.watchlistOptions().requestTimeout(5000);
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); }
consumerRole.watchlistOptions().postAckTimeout(5000); postMsg.clear(); postMsg.msgClass(MsgClasses.POST);
consumerRole.dictionaryMsgCallback(consumer); consumerRole.defaultMsgCallback(consumer); consumerRole.watchlistOptions().channelOpenCallback(consumer);