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

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

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

Unsafe.getFloatVolatile介绍

[英]Volatile version of #getFloat(Object,long)
[中]#getFloat的易失性版本(对象,长)

代码示例

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

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

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

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

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

public static float getFloatVolatile( Object obj, long offset )
{
  return unsafe.getFloatVolatile( obj, offset );
}

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

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

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

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

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

public float getFloatVolatile(Object target, long offset) {
  return unsafe.getFloatVolatile(target, offset);
}

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

public float getFloatVolatile(Object target, long offset) {
  return unsafe.getFloatVolatile(target, offset);
}

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

public static float getFloatVolatile( long address )
{
  checkAccess( address, Float.BYTES );
  return unsafe.getFloatVolatile( null, address );
}

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

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

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

@Override
  public float getFloat( Object obj ) {
    return unsafe.getFloatVolatile( obj, offset );
  }
}

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

@Override
  public float getFloat( Object obj ) {
    return unsafe.getFloatVolatile( obj, offset );
  }
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
public float getFloatVolatile(Object base, long offset) {
  return UNSAFE.getFloatVolatile(base, offset);
}

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

@Override
public float getFloatVolatile(long address) {
  AlignmentUtil.check4BytesAligned(address);
  return UNSAFE.getFloatVolatile(null, address);
}

代码示例来源:origin: OpenHFT/Chronicle-Core

@Override
@ForceInline
public float readVolatileFloat(long address) {
  // TODO add support for a float split across cache lines.
  return UNSAFE.getFloatVolatile(null, address);
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
public float getFloatVolatile(Object base, long offset) {
  AlignmentUtil.check4BytesAligned(offset);
  return UNSAFE.getFloatVolatile(base, offset);
}

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

@Override
public float getFloatVolatile(Object base, long offset) {
  AlignmentUtil.check4BytesAligned(offset);
  return UNSAFE.getFloatVolatile(base, offset);
}

代码示例来源:origin: OpenHFT/Chronicle-Core

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

代码示例来源:origin: mercyblitz/confucius-commons

/**
 * 获取指定对象<code>volatile</code>字段的float值
 *
 * @param object
 *         对象
 * @param fieldName
 *         字段名称
 * @return float值
 */
public static float getFloatVolatile(Object object, String fieldName) {
  long offset = getObjectFieldOffset(object, fieldName);
  return unsafe.getFloatVolatile(object, offset);
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
public float getFloatVolatile(long address) {
  AlignmentUtil.check4BytesAligned(address);
  return UNSAFE.getFloatVolatile(null, address);
}

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

@Override
@ForceInline
public float readVolatileFloat(long address) {
  // TODO add support for a float split across cache lines.
  return UNSAFE.getFloatVolatile(null, address);
}

相关文章

Unsafe类方法