sun.misc.Unsafe.putOrderedLong()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(165)

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

Unsafe.putOrderedLong介绍

[英]Lazy set a long field.
[中]懒惰的人有很长的路要走。

代码示例

代码示例来源:origin: LMAX-Exchange/disruptor

/**
 * Create a sequence with a specified initial value.
 *
 * @param initialValue The initial value for this sequence.
 */
public Sequence(final long initialValue)
{
  UNSAFE.putOrderedLong(this, VALUE_OFFSET, initialValue);
}

代码示例来源:origin: LMAX-Exchange/disruptor

/**
 * Perform an ordered write of this sequence.  The intent is
 * a Store/Store barrier between this write and any previous
 * store.
 *
 * @param value The new value for the sequence.
 */
public void set(final long value)
{
  UNSAFE.putOrderedLong(this, VALUE_OFFSET, value);
}

代码示例来源:origin: ben-manes/caffeine

void lazySetReadCounter(long count) {
  UnsafeAccess.UNSAFE.putOrderedLong(this, READ_OFFSET, count);
 }
}

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

public void onFragment(final DirectBuffer buffer, final int offset, final int length, final Header header)
  {
    UNSAFE.putOrderedLong(this, TOTAL_BYTES_OFFSET, totalBytes + length);
  }
}

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

public void onFragment(final DirectBuffer buffer, final int offset, final int length, final Header header)
  {
    UNSAFE.putOrderedLong(this, TOTAL_BYTES_OFFSET, totalBytes + length);
  }
}

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

public void onFragment(final DirectBuffer buffer, final int offset, final int length, final Header header)
  {
    UNSAFE.putOrderedLong(this, TOTAL_BYTES_OFFSET, totalBytes + length);
  }
}

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

public void onFragment(final DirectBuffer buffer, final int offset, final int length, final Header header)
  {
    UNSAFE.putOrderedLong(this, TOTAL_BYTES_OFFSET, totalBytes + length);
  }
}

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

public void onFragment(final DirectBuffer buffer, final int offset, final int length, final Header header)
  {
    UNSAFE.putOrderedLong(this, TOTAL_BYTES_OFFSET, totalBytes + length);
  }
}

代码示例来源:origin: ben-manes/caffeine

private void soProducerLimit(long v) {
 UNSAFE.putOrderedLong(this, P_LIMIT_OFFSET, v);
}

代码示例来源:origin: ben-manes/caffeine

ReadAndWriteCounterRef() {
 UnsafeAccess.UNSAFE.putOrderedLong(this, WRITE_OFFSET, OFFSET);
}

代码示例来源:origin: ben-manes/caffeine

private void soProducerIndex(long v) {
 UNSAFE.putOrderedLong(this, P_INDEX_OFFSET, v);
}

代码示例来源:origin: ben-manes/caffeine

private void soConsumerIndex(long v) {
 UNSAFE.putOrderedLong(this, C_INDEX_OFFSET, v);
}

代码示例来源:origin: reactor/reactor-core

/**
 * Create a sequence with a specified initial value.
 *
 * @param initialValue The initial value for this sequence.
 */
UnsafeSequence(final long initialValue)
{
  UNSAFE.putOrderedLong(this, VALUE_OFFSET, initialValue);
}

代码示例来源:origin: reactor/reactor-core

@Override
public void set(final long value)
{
  UNSAFE.putOrderedLong(this, VALUE_OFFSET, value);
}

代码示例来源:origin: ben-manes/caffeine

void lazySetReadCache(long count) {
  UnsafeAccess.UNSAFE.putOrderedLong(this, READ_CACHE_OFFSET, count);
 }
}

代码示例来源:origin: ben-manes/caffeine

void lazySetReadCounter(long count) {
  UnsafeAccess.UNSAFE.putOrderedLong(this, READ_OFFSET, count);
 }
}

代码示例来源:origin: ben-manes/caffeine

void lazySetReadCounter(long count) {
  UnsafeAccess.UNSAFE.putOrderedLong(this, READ_OFFSET, count);
 }
}

代码示例来源:origin: ben-manes/caffeine

void lazySetReadCounter(long count) {
  UnsafeAccess.UNSAFE.putOrderedLong(this, READ_OFFSET, count);
 }
}

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

private void putRawTailOrdered(final int termId, final int termOffset)
  {
    UnsafeAccess.UNSAFE.putOrderedLong(null, tailAddressOffset, packTail(termId, termOffset));
  }
}

代码示例来源:origin: ben-manes/caffeine

void setRelaxedLong(long value) {
 UnsafeAccess.UNSAFE.putOrderedLong(this, RelaxedFields.LVALUE_OFFSET, value);
}

相关文章

Unsafe类方法