Java/Ema/PerfTools/src/main/java/com/refinitiv/ema/perftools/emajconsperf/ConsumerThread.java
private boolean sendItemRequestBurst(int itemBurstCount)
    {
    	ItemRequest itemRequest;

    	for(int i = 0; i < itemBurstCount; ++i)
    	{
	    		if (_requestListIndex == _requestListSize)
	    			return true;
	
	    		itemRequest = _itemRequestList[_requestListIndex];
	
	    		_requestMsg.clear();
	    		
	    		//don't apply streaming for JVM priming and snapshot
	    		if (_consPerfConfig.requestSnapshots() || (itemRequest.itemInfo().itemFlags() & ItemFlags.IS_STREAMING_REQ) == 0 || 
	    			 (_consPerfConfig.primeJVM() && _JVMPrimingRefreshCount < _requestListSize))
	    			_requestMsg.interestAfterRefresh(false);
	    		else
	    			_requestMsg.interestAfterRefresh(true);
	
	    		_requestMsg.domainType(itemRequest.itemInfo().attributes().domainType());
	    		_requestMsg.name(itemRequest.itemName());
	    		if (_consPerfConfig.useServiceId())
	    			_requestMsg.serviceId(_srcDirHandler.serviceId());
	    		else
	    			_requestMsg.serviceName(_consPerfConfig.serviceName());
	    		
	    		_itemHandle = _consumer.registerClient(_requestMsg, this,  itemRequest.itemInfo());
	            if (_itemHandle == 0)
	            {
	                System.out.printf("Sending item request failed: %d.\n");
	                return false;
	            }
	
	    		//request has been made.
	    		itemRequest.requestState(ItemRequestState.WAITING_FOR_REFRESH);
	
	    		_requestListIndex++;
	    		_consThreadInfo.stats().requestCount().increment();
	    	}

    	return true;
    }
//sends a burst of item requests.

sends a burst of item requests.
sends a burst of item requests .
private boolean sendItemRequestBurst(int itemBurstCount)
    {
    	ItemRequest itemRequest;
    	for(int i = 0; i < itemBurstCount; ++i)
    	{
	    		if (_requestListIndex == _requestListSize)
	    			return true;
	    		itemRequest = _itemRequestList[_requestListIndex];
	    		_requestMsg.clear();
	    		if (_consPerfConfig.requestSnapshots() || (itemRequest.itemInfo().itemFlags() & ItemFlags.IS_STREAMING_REQ) == 0 || 
	    			 (_consPerfConfig.primeJVM() && _JVMPrimingRefreshCount < _requestListSize))
	    			_requestMsg.interestAfterRefresh(false);
	    		else
	    			_requestMsg.interestAfterRefresh(true);
	    		_requestMsg.domainType(itemRequest.itemInfo().attributes().domainType());
	    		_requestMsg.name(itemRequest.itemName());
	    		if (_consPerfConfig.useServiceId())
	    			_requestMsg.serviceId(_srcDirHandler.serviceId());
	    		else
	    			_requestMsg.serviceName(_consPerfConfig.serviceName());
	    		_itemHandle = _consumer.registerClient(_requestMsg, this,  itemRequest.itemInfo());
	            if (_itemHandle == 0)
	            {
	                System.out.printf("Sending item request failed: %d.\n");
	                return false;
	            }
	    		itemRequest.requestState(ItemRequestState.WAITING_FOR_REFRESH);
	    		_requestListIndex++;
	    		_consThreadInfo.stats().requestCount().increment();
	    	}
    	return true;
    }
private boolean sendItemRequestBurst ( int itemBurstCount ) { ItemRequest itemRequest ; for ( int i = 0 ; i < itemBurstCount ; ++ i ) { if ( _requestListIndex == _requestListSize ) return true ; itemRequest = _itemRequestList [ _requestListIndex ] ; _requestMsg . clear ( ) ; if ( _consPerfConfig . requestSnapshots ( ) || ( itemRequest . itemInfo ( ) . itemFlags ( ) & ItemFlags . IS_STREAMING_REQ ) == 0 || ( _consPerfConfig . primeJVM ( ) && _JVMPrimingRefreshCount < _requestListSize ) ) _requestMsg . interestAfterRefresh ( false ) ; else _requestMsg . interestAfterRefresh ( true ) ; _requestMsg . domainType ( itemRequest . itemInfo ( ) . attributes ( ) . domainType ( ) ) ; _requestMsg . name ( itemRequest . itemName ( ) ) ; if ( _consPerfConfig . useServiceId ( ) ) _requestMsg . serviceId ( _srcDirHandler . serviceId ( ) ) ; else _requestMsg . serviceName ( _consPerfConfig . serviceName ( ) ) ; _itemHandle = _consumer . registerClient ( _requestMsg , this , itemRequest . itemInfo ( ) ) ; if ( _itemHandle == 0 ) { System . out . printf ( "Sending item request failed: %d.\n" ) ; return false ; } itemRequest . requestState ( ItemRequestState . WAITING_FOR_REFRESH ) ; _requestListIndex ++ ; _consThreadInfo . stats ( ) . requestCount ( ) . increment ( ) ; } return true ; }
sends a burst of item requests.
sends a burst of item requests .
//don't apply streaming for JVM priming and snapshot
 //request has been made.
