public abstract class AbstractKafkaMessageSerializer extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
ATTRIBUTE_OFFSET |
static byte |
COMPRESSION_CODEC_MASK |
static byte |
CONTROL_FLAG_MASK |
static int |
CRC_OFFSET |
protected static int |
DECOMPRESS_BUFFER_SIZE |
static int |
EXTENSION_ATTRIBUTE_OFFSET |
static int |
EXTENSION_MAGIC_OFFSET |
static int |
EXTENSION_TIMESTAMP_OFFSET |
static byte |
INVALID_EXTENSION_MAGIC |
static int |
MAGIC_OFFSET |
static byte |
MESSAGE_CURRENT_MAGIC |
static byte |
MESSAGE_MAGIC_V0 |
static byte |
MESSAGE_MAGIC_V1 |
static byte |
MESSAGE_MAGIC_V2 |
static int |
OFFSET_OFFSET |
static int |
SIZE_OFFSET |
static byte |
TIMESTAMP_TYPE_MASK |
static byte |
TRANSACTIONAL_FLAG_MASK |
| 构造器和说明 |
|---|
AbstractKafkaMessageSerializer() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
decompress(KafkaCompressionCodec compressionCodec,
ByteBuffer buffer,
byte messageMagic) |
static ByteBuffer |
decompressBuffer(KafkaCompressionCodec compressionCodec,
ByteBuffer buffer,
byte messageMagic) |
static int |
getCompressionCodecType(short attribute) |
static byte |
getExtensionMagic(byte[] extension) |
static int |
getTimestampType(short attribute) |
static boolean |
isTransactionl(short attribute) |
static short |
readExtensionAttribute(byte[] extension) |
static byte |
readExtensionMagic(byte[] extension) |
static long |
readExtensionTimestamp(byte[] extension) |
static void |
writeExtensionAttribute(byte[] extension,
short attribute) |
static void |
writeExtensionMagic(byte[] extension,
byte magic) |
static void |
writeExtensionTimestamp(byte[] extension,
long timestamp) |
public static final byte MESSAGE_MAGIC_V0
public static final byte MESSAGE_MAGIC_V1
public static final byte MESSAGE_MAGIC_V2
public static final byte MESSAGE_CURRENT_MAGIC
public static final byte INVALID_EXTENSION_MAGIC
public static final int EXTENSION_MAGIC_OFFSET
public static final int EXTENSION_TIMESTAMP_OFFSET
public static final int EXTENSION_ATTRIBUTE_OFFSET
public static final int OFFSET_OFFSET
public static final int SIZE_OFFSET
public static final int CRC_OFFSET
public static final int MAGIC_OFFSET
public static final int ATTRIBUTE_OFFSET
public static final byte COMPRESSION_CODEC_MASK
public static final byte TRANSACTIONAL_FLAG_MASK
public static final byte CONTROL_FLAG_MASK
public static final byte TIMESTAMP_TYPE_MASK
protected static final int DECOMPRESS_BUFFER_SIZE
public static byte getExtensionMagic(byte[] extension)
public static void writeExtensionMagic(byte[] extension,
byte magic)
public static void writeExtensionTimestamp(byte[] extension,
long timestamp)
public static void writeExtensionAttribute(byte[] extension,
short attribute)
public static byte readExtensionMagic(byte[] extension)
public static long readExtensionTimestamp(byte[] extension)
public static short readExtensionAttribute(byte[] extension)
public static int getCompressionCodecType(short attribute)
public static boolean isTransactionl(short attribute)
public static int getTimestampType(short attribute)
public static byte[] decompress(KafkaCompressionCodec compressionCodec, ByteBuffer buffer, byte messageMagic) throws Exception
Exceptionpublic static ByteBuffer decompressBuffer(KafkaCompressionCodec compressionCodec, ByteBuffer buffer, byte messageMagic) throws Exception
ExceptionCopyright © 2020 Joyqueue Community. All rights reserved.