com.thomsonreuters.upa.transport.WriteArgs类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中com.thomsonreuters.upa.transport.WriteArgs类的一些代码示例,展示了WriteArgs类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriteArgs类的具体详情如下:
包路径:com.thomsonreuters.upa.transport.WriteArgs
类名称:WriteArgs

WriteArgs介绍

[英]UPA Write Arguments used in the Channel#write(TransportBuffer,WriteArgs,Error) call.
[中]通道#写入(TransportBuffer、WriteArgs、Error)调用中使用的UPA写入参数。

代码示例

代码示例来源:origin: Refinitiv/Elektron-SDK

protected int writeWithBuffersQueued(TransportBufferImpl buffer, WriteArgs writeArgs, Error error)
{
  int retVal = TransportReturnCodes.SUCCESS;
  int scktBytesWritten = 0;
  // queue buffer
  addToPriorityQueue(buffer, writeArgs.priority());
  // update total bytes queued
  _totalBytesQueued += buffer._length;
  // set socket bytes written
  scktBytesWritten = buffer._length;
  ((WriteArgsImpl)writeArgs).bytesWritten(scktBytesWritten);
  // if direct socket write or high water mark reached, call flush
  if ((writeArgs.flags() & WriteFlags.DIRECT_SOCKET_WRITE) > 0 || _totalBytesQueued > _highWaterMark)
  {
    retVal = flushInternal(error);
  }
  else
  {
    retVal = _totalBytesQueued;
  }
  return retVal;
}

代码示例来源:origin: Refinitiv/Elektron-SDK

_writeArgs.clear();
_writeArgs.priority(WritePriorities.HIGH);
_writeArgs.flags(writeFlags);

代码示例来源:origin: Refinitiv/Elektron-SDK

_writeArgs.clear();
_writeArgs.priority(_priority);
  _bytesWritten += _writeArgs.bytesWritten();
  _uncompressedBytesWritten += _writeArgs.uncompressedBytesWritten();

代码示例来源:origin: Refinitiv/Elektron-SDK

void write(TransportBuffer writeBuffer)
{
  _writeArgs.clear();
  _writeArgs.flags(WriteFlags.DIRECT_SOCKET_WRITE);
  assertEquals(TransportReturnCodes.SUCCESS, _channel.write(writeBuffer, _writeArgs, _error));
}

代码示例来源:origin: Refinitiv/Elektron-SDK

writeArgs.priority(WritePriorities.HIGH);
writeArgs.flags(WriteFlags.DIRECT_SOCKET_WRITE);
assertEquals(TransportReturnCodes.SUCCESS, rsslChnl.write(transBuf, writeArgs, error));
assertTrue(writeArgs.bytesWritten() == bufLen + 3);

代码示例来源:origin: Refinitiv/Elektron-SDK

writeArgs.priority(WritePriorities.HIGH);
writeArgs.flags(WriteFlags.NO_FLAGS);
assertTrue(rsslChnl.write(transBuf, writeArgs, error) > 0);
assertEquals(74, writeArgs.bytesWritten());
assertEquals(81, writeArgs.uncompressedBytesWritten());
transBuf1._isWriteBuffer = true;
writeArgs.priority(WritePriorities.HIGH);
writeArgs.flags(WriteFlags.NO_FLAGS);
assertTrue(rsslChnl.write(transBuf1, writeArgs, error) > 0);
assertEquals(13, writeArgs.bytesWritten());
assertEquals(81, writeArgs.uncompressedBytesWritten());
transBuf2._isWriteBuffer = true;
writeArgs.priority(WritePriorities.HIGH);
writeArgs.flags(WriteFlags.NO_FLAGS);
assertTrue(rsslChnl.write(transBuf2, writeArgs, error) > 0);
assertEquals(12, writeArgs.bytesWritten());
assertEquals(81, writeArgs.uncompressedBytesWritten());

代码示例来源:origin: Refinitiv/Elektron-SDK

protected void writeFragment(TransportBufferImpl buffer, WriteArgs writeArgs)
{
  // queue buffer
  addToPriorityQueue(buffer, writeArgs.priority());
  // update total bytes queued
  _totalBytesQueued += buffer._length;
}

代码示例来源:origin: Refinitiv/Elektron-SDK

public TransportSession(ClientChannelInfo channelInfo)
{
  _maxMsgBufSize = TransportThreadConfig.totalBuffersPerPack() * TransportThreadConfig.msgSize();
  /* If the buffer is to be packed, add some additional bytes for each message. */
  if (channelInfo.channel.connectionType() == ConnectionTypes.SEQUENCED_MCAST && 
      TransportThreadConfig.totalBuffersPerPack() > 1)
    _maxMsgBufSize = _maxMsgBufSize + ((TransportThreadConfig.totalBuffersPerPack() - 1) * 2);
  else if (TransportThreadConfig.totalBuffersPerPack() > 1)
    _maxMsgBufSize = _maxMsgBufSize + (TransportThreadConfig.totalBuffersPerPack() * 8);
  _channelInfo = channelInfo;
  _channelInfo.userSpec = this;
  
  _writeArgs.flags(TransportThreadConfig.writeFlags());
}

代码示例来源:origin: Refinitiv/Elektron-SDK

int position = bigBuffer._data.position();
int limit = bigBuffer._data.limit();
int uncompressedBytesWritten = writeArgs.uncompressedBytesWritten();
int bytesWritten = writeArgs.bytesWritten();

代码示例来源:origin: Refinitiv/Elektron-SDK

System.out.println("[Packing] availableRemaining at end of packing:" + availableRemaining);
_writeArgs.clear();
  _bytesWritten += _writeArgs.bytesWritten();
  _uncompressedBytesWritten += _writeArgs.uncompressedBytesWritten();

代码示例来源:origin: Refinitiv/Elektron-SDK

handler.bytesSent().add(_writeArgs.bytesWritten());
handler.msgsSent().increment();
return ret;
  if (chnl.state() == ChannelState.ACTIVE)
    handler.bytesSent().add(_writeArgs.bytesWritten());
    handler.msgsSent().increment();
    return 1;

代码示例来源:origin: Refinitiv/Elektron-SDK

if (((writeArgs.flags() & WriteFlags.WRITE_RETRANSMIT) > 0 && (writeArgs.flags() & WriteFlags.WRITE_SEQNUM) == 0)
    || ((writeArgs.flags() & WriteFlags.WRITE_RETRANSMIT) == 0 && (writeArgs.flags() & WriteFlags.WRITE_SEQNUM) > 0))
if ((writeArgs.flags() & WriteFlags.WRITE_SEQNUM) > 0)
  seqNum = writeArgs.seqNum();
  if (seqNum < 0 || seqNum > 4294967295L)
if ((writeArgs.flags() & WriteFlags.WRITE_RETRANSMIT) > 0)
  flags = SEQ_MCAST_FLAGS_RETRANSMIT;

代码示例来源:origin: Refinitiv/Elektron-SDK

/**
   * Clears this object for reuse.
   */
  public void clear()
  {
    _writeArgs.clear();
    _serviceName = null;
    _requestMsgOptions.clear();
  }
}

代码示例来源:origin: Refinitiv/Elektron-SDK

compFragmentBuffer.populateHTTPOverhead();
((WriteArgsImpl)writeArgs).uncompressedBytesWritten(writeArgs.uncompressedBytesWritten() + Ripc.Lengths.HEADER + HTTP_HEADER6 + CHUNKEND_SIZE);
totalBytes += compFragmentBuffer._length;

代码示例来源:origin: Refinitiv/Elektron-SDK

writeArgs.priority(WritePriorities.HIGH);
writeArgs.flags(WriteFlags.DIRECT_SOCKET_WRITE);
assertTrue(rsslChnl.write(transBuf, writeArgs, error) == (bufLen - 5));
assertTrue(writeArgs.bytesWritten() == 5 + 3);

代码示例来源:origin: Refinitiv/Elektron-SDK

writeArgs.priority(WritePriorities.HIGH);
writeArgs.flags(WriteFlags.NO_FLAGS);
assertTrue(channel.write(sendbuffer, writeArgs, error) > 0);
assertEquals(58, writeArgs.uncompressedBytesWritten());
assertEquals(47, writeArgs.bytesWritten());
assertTrue(channel.packBuffer(sendbuffer, error) > 0);
writeArgs.priority(WritePriorities.HIGH);
writeArgs.flags(WriteFlags.NO_FLAGS);
assertTrue(channel.write(sendbuffer, writeArgs, error) > 0);
assertEquals(63, writeArgs.uncompressedBytesWritten());
assertEquals(29, writeArgs.bytesWritten());

代码示例来源:origin: Refinitiv/Elektron-SDK

OmmConsumerImpl(OmmConsumerConfig config, OmmConsumerClient adminClient, OmmConsumerErrorClient client)
{
  super();
  _activeConfig = new OmmConsumerActiveConfig();
  /* the client needs to be set before calling initialize, so the proper item callbacks are set */
  _adminClient = adminClient;
  _adminClosure = null;
  _consumerErrorClient = client;
  super.initialize(_activeConfig, (OmmConsumerConfigImpl)config);
  
  _rsslSubmitOptions.writeArgs().priority(WritePriorities.HIGH);		
}

代码示例来源:origin: Refinitiv/Elektron-SDK

WriteArgs writeArgs = TransportFactory.createWriteArgs();
writeArgs.flags(WriteFlags.NO_FLAGS);

代码示例来源:origin: Refinitiv/Elektron-SDK

int position = bigBuffer._data.position();
int limit = bigBuffer._data.limit();
int uncompressedBytesWritten = writeArgs.uncompressedBytesWritten();
int bytesWritten = writeArgs.bytesWritten();

代码示例来源:origin: Refinitiv/Elektron-SDK

handler.transportThread().bytesSent().add(_writeArgs.bytesWritten());
handler.transportThread().msgsSent().increment();
  if (chnl.state() == ChannelState.ACTIVE)
    handler.transportThread().bytesSent().add(_writeArgs.bytesWritten());
    handler.transportThread().msgsSent().increment();
    channelHandler.requestFlush(channelInfo);

相关文章