io.aeron.logbuffer.Header.offset()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(104)

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

Header.offset介绍

[英]The offset at which the frame begins.
[中]帧开始的偏移量。

代码示例

代码示例来源:origin: real-logic/aeron

header.offset(frameOffset);
handler.onFragment(termBuffer, frameOffset + HEADER_LENGTH, frameLength - HEADER_LENGTH, header);

代码示例来源:origin: real-logic/aeron

header.offset(frameOffset);

代码示例来源:origin: real-logic/aeron

header.offset(frameOffset);
handler.onFragment(termBuffer, frameOffset + HEADER_LENGTH, frameLength - HEADER_LENGTH, header);

代码示例来源:origin: real-logic/aeron

header.offset(frameOffset);

代码示例来源:origin: real-logic/aeron

header.offset(frameOffset);

代码示例来源:origin: real-logic/aeron

private void recordFragment(
  final RecordingWriter recordingWriter,
  final UnsafeBuffer buffer,
  final DataHeaderFlyweight headerFlyweight,
  final Header header,
  final int message,
  final byte flags,
  final int type)
{
  final int offset = INITIAL_TERM_OFFSET + message * FRAME_LENGTH;
  headerFlyweight.wrap(buffer, offset, HEADER_LENGTH);
  headerFlyweight
    .streamId(STREAM_ID)
    .sessionId(SESSION_ID)
    .termOffset(offset)
    .termId(INITIAL_TERM_ID)
    .reservedValue(message)
    .headerType(type)
    .flags(flags)
    .frameLength(FRAME_LENGTH);
  buffer.setMemory(
    offset + HEADER_LENGTH,
    FRAME_LENGTH - HEADER_LENGTH,
    (byte)message);
  header.offset(offset);
  recordingWriter.onBlock(buffer, offset, FRAME_LENGTH, SESSION_ID, INITIAL_TERM_ID);
  recordingPosition += FRAME_LENGTH;
}

代码示例来源:origin: io.aeron/aeron-client

header.offset(frameOffset);
handler.onFragment(termBuffer, frameOffset + HEADER_LENGTH, frameLength - HEADER_LENGTH, header);

代码示例来源:origin: io.aeron/aeron-all

header.offset(frameOffset);
handler.onFragment(termBuffer, frameOffset + HEADER_LENGTH, frameLength - HEADER_LENGTH, header);

代码示例来源:origin: io.aeron/aeron-all

header.offset(frameOffset);

代码示例来源:origin: io.aeron/aeron-client

header.offset(frameOffset);

代码示例来源:origin: io.aeron/aeron-client

header.offset(frameOffset);
handler.onFragment(termBuffer, frameOffset + HEADER_LENGTH, frameLength - HEADER_LENGTH, header);

代码示例来源:origin: io.aeron/aeron-all

header.offset(frameOffset);

代码示例来源:origin: io.aeron/aeron-client

header.offset(frameOffset);

代码示例来源:origin: io.aeron/aeron-all

header.offset(frameOffset);
handler.onFragment(termBuffer, frameOffset + HEADER_LENGTH, frameLength - HEADER_LENGTH, header);

代码示例来源:origin: io.aeron/aeron-client

header.offset(frameOffset);

代码示例来源:origin: io.aeron/aeron-all

header.offset(frameOffset);

相关文章