本文整理汇总了Java中org.agrona.concurrent.UnsafeBuffer.getByte方法的典型用法代码示例。如果您正苦于以下问题:Java UnsafeBuffer.getByte方法的具体用法?Java UnsafeBuffer.getByte怎么用?Java UnsafeBuffer.getByte使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.agrona.concurrent.UnsafeBuffer
的用法示例。
在下文中一共展示了UnsafeBuffer.getByte方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isValidDescriptor
import org.agrona.concurrent.UnsafeBuffer; //导入方法依赖的package包/类
static boolean isValidDescriptor(final UnsafeBuffer descriptorBuffer)
{
return descriptorBuffer.getByte(RecordingDescriptorHeaderDecoder.validEncodingOffset()) == VALID;
}
示例2: isEndOfStream
import org.agrona.concurrent.UnsafeBuffer; //导入方法依赖的package包/类
/**
* Does the data frame in the packet have the EOS flag set?
*
* @param packet containing the data frame.
* @return true if the EOS flag is set otherwise false.
*/
public static boolean isEndOfStream(final UnsafeBuffer packet)
{
return BEGIN_END_AND_EOS_FLAGS == (packet.getByte(FLAGS_FIELD_OFFSET) & 0xFF);
}
示例3: frameVersion
import org.agrona.concurrent.UnsafeBuffer; //导入方法依赖的package包/类
/**
* Read the type of of the frame from header.
*
* @param buffer containing the frame.
* @param termOffset at which a frame begins.
* @return the value of the frame type header.
*/
public static int frameVersion(final UnsafeBuffer buffer, final int termOffset)
{
return buffer.getByte(versionOffset(termOffset));
}
示例4: frameFlags
import org.agrona.concurrent.UnsafeBuffer; //导入方法依赖的package包/类
/**
* Get the flags field for a frame.
*
* @param buffer containing the frame.
* @param termOffset at which a frame begins.
* @return the value of the flags.
*/
public static byte frameFlags(final UnsafeBuffer buffer, final int termOffset)
{
return buffer.getByte(flagsOffset(termOffset));
}