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

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

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

Unsafe.getShortVolatile介绍

[英]Volatile version of #getShort(Object,long)
[中]#getShort(Object,long)的易失性版本

代码示例

代码示例来源:origin: redisson/redisson

@Override
public short getShortVolatile(long byteIndex) {
  return unsafe.getShortVolatile(base, off + byteIndex);
}

代码示例来源:origin: redisson/redisson

@Override
public short getShortVolatile(long byteIndex) {
  return unsafe.getShortVolatile(null, baseAdress + byteIndex);
}

代码示例来源:origin: neo4j/neo4j

public static short getShortVolatile( Object obj, long offset )
{
  return unsafe.getShortVolatile( obj, offset );
}

代码示例来源:origin: RuedigerMoeller/fast-serialization

@Override
public short getShortVolatile(long byteIndex) {
  return unsafe.getShortVolatile(null, baseAdress + byteIndex);
}

代码示例来源:origin: RuedigerMoeller/fast-serialization

@Override
public short getShortVolatile(long byteIndex) {
  return unsafe.getShortVolatile(base, off + byteIndex);
}

代码示例来源:origin: fengjiachun/Jupiter

public short getShortVolatile(Object target, long offset) {
  return unsafe.getShortVolatile(target, offset);
}

代码示例来源:origin: fengjiachun/Jupiter

public short getShortVolatile(Object target, long offset) {
  return unsafe.getShortVolatile(target, offset);
}

代码示例来源:origin: neo4j/neo4j

public static short getShortVolatile( long address )
{
  checkAccess( address, Short.BYTES );
  return unsafe.getShortVolatile( null, address );
}

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

public short getShortVolatile(final long index)
{
  if (SHOULD_BOUNDS_CHECK)
  {
    boundsCheck0(index, SIZE_OF_SHORT);
  }
  return UNSAFE.getShortVolatile(null, addressOffset + index);
}

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

public short getShortVolatile(final int index)
{
  if (SHOULD_BOUNDS_CHECK)
  {
    boundsCheck0(index, SIZE_OF_SHORT);
  }
  return UNSAFE.getShortVolatile(byteArray, addressOffset + index);
}

代码示例来源:origin: aaberg/sql2o

public Object getProperty(Object obj) {
  return theUnsafe.getShortVolatile(obj, offset);
}

代码示例来源:origin: boonproject/boon

@Override
  public short getShort( Object obj ) {
    return unsafe.getShortVolatile( obj, offset );
  }
}

代码示例来源:origin: boonproject/boon

@Override
  public short getShort( Object obj ) {
    return unsafe.getShortVolatile( obj, offset );
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public short getShortVolatile(long address) {
  AlignmentUtil.check2BytesAligned(address);
  return UNSAFE.getShortVolatile(null, address);
}

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public short getShortVolatile(Object base, long offset) {
  AlignmentUtil.check2BytesAligned(offset);
  return UNSAFE.getShortVolatile(base, offset);
}

代码示例来源:origin: org.agrona/Agrona

public short getShortVolatile(final long index)
{
  if (SHOULD_BOUNDS_CHECK)
  {
    boundsCheck0(index, SIZE_OF_SHORT);
  }
  return UNSAFE.getShortVolatile(null, addressOffset + index);
}

代码示例来源:origin: org.agrona/Agrona

public short getShortVolatile(final int index)
{
  if (SHOULD_BOUNDS_CHECK)
  {
    boundsCheck0(index, SIZE_OF_SHORT);
  }
  return UNSAFE.getShortVolatile(byteArray, addressOffset + index);
}

代码示例来源:origin: net.openhft/chronicle-core

@Override
@ForceInline
public short readVolatileShort(@NotNull Object object, long offset) {
  if (object == null)
    throw new NullPointerException();
  return UNSAFE.getShortVolatile(object, offset);
}

代码示例来源:origin: org.neo4j/neo4j-unsafe

public static short getShortVolatile( long address )
{
  checkAccess( address, Short.BYTES );
  return unsafe.getShortVolatile( null, address );
}

代码示例来源:origin: uk.co.real-logic/Agrona

public short getShortVolatile(final int index)
{
  if (SHOULD_BOUNDS_CHECK)
  {
    boundsCheck0(index, SIZE_OF_SHORT);
  }
  return UNSAFE.getShortVolatile(byteArray, addressOffset + index);
}

相关文章

Unsafe类方法