类 MpUnboundedBufferChunk<E>

java.lang.Object
cn.wjybxx.disruptor.MpUnboundedBufferChunk<E>

public final class MpUnboundedBufferChunk<E> extends Object
作者:
wjybxx date - 2024/1/16
  • 构造器详细资料

    • MpUnboundedBufferChunk

      public MpUnboundedBufferChunk(int length, long chunkIndex, MpUnboundedBufferChunk<E> prev)
      参数:
      length - chunk的长度
      chunkIndex - chunk的索引
      prev - 前置节点
  • 方法详细资料

    • spElement

      public final void spElement(int index, E e)
      store plain element
    • lpElement

      public final E lpElement(int index)
      load plain element
    • soElement

      public final void soElement(int index, E e)
      store ordered element
    • lvElement

      public final E lvElement(int index)
      load volatile element
    • publish

      public final void publish(int index)
      将指定槽位标记为已发布
    • publish

      public final void publish(int low, int high)
      批量发布数据
      参数:
      low - 起始下标(inclusive)
      high - 结束下标(inclusive)
    • isPublished

      public final boolean isPublished(int index)
    • getHighestPublished

      public final int getHighestPublished(int low, int high)
      返回:
      highest index
    • minSequence

      public final long minSequence()
      获取chunk上数据的最小sequence -- plain内存语义
    • maxSequence

      public final long maxSequence()
      获取chunk上数据的最大sequence -- plain内存语义
    • length

      public final int length()
      buffer的长度
    • fill

      public final void fill(EventFactory<? extends E> factory)
      填充chunk - 使用Plain内存语义
    • clear

      public final void clear()
      清理chunk - 使用Plain内存语义