本文整理汇总了Java中org.apache.ignite.internal.util.GridUnsafe.putFloat方法的典型用法代码示例。如果您正苦于以下问题:Java GridUnsafe.putFloat方法的具体用法?Java GridUnsafe.putFloat怎么用?Java GridUnsafe.putFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.internal.util.GridUnsafe
的用法示例。
在下文中一共展示了GridUnsafe.putFloat方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeFloat
import org.apache.ignite.internal.util.GridUnsafe; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public void writeFloat(float val) {
lastFinished = buf.remaining() >= 4;
if (lastFinished) {
int pos = buf.position();
long off = baseOff + pos;
if (BIG_ENDIAN)
GridUnsafe.putFloatLE(heapArr, off, val);
else
GridUnsafe.putFloat(heapArr, off, val);
buf.position(pos + 4);
}
}
示例2: writeFloat
import org.apache.ignite.internal.util.GridUnsafe; //导入方法依赖的package包/类
/**
* @param val Value.
*/
@Override public void writeFloat(float val) {
lastFinished = buf.remaining() >= 4;
if (lastFinished) {
int pos = buf.position();
GridUnsafe.putFloat(heapArr, baseOff + pos, val);
buf.position(pos + 4);
}
}
示例3: writeFloat
import org.apache.ignite.internal.util.GridUnsafe; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public void writeFloat(float val) throws IOException {
int writePos = ensure(4);
GridUnsafe.putFloat(buf, BYTE_ARR_OFF + writePos, val);
}
示例4: writeFloat
import org.apache.ignite.internal.util.GridUnsafe; //导入方法依赖的package包/类
/**
* @param ptr Pointer.
* @param v Value.
*/
public void writeFloat(long ptr, float v) {
GridUnsafe.putFloat(ptr, v);
}