Enum Class SchemaType
- 所有已实现的接口:
Serializable,Comparable<SchemaType>,Constable
Types of supported schema for Pulsar messages.
Ideally we should have just one single set of enum definitions for schema type. but we have 3 locations of defining schema types.
when you are adding a new schema type that whose schema info is required to be recorded in schema registry, add corresponding schema type into `pulsar-common/src/main/proto/PulsarApi.proto` and `pulsar-broker/src/main/proto/SchemaRegistryFormat.proto`.
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量枚举常量说明已过时。Auto Consume Type.Auto Publish Type.Serialize and deserialize via avro.boolean schema defined.A bytes array.Date.A double number.A float number.Instant.A 16-byte integer.A 32-byte integer.A 64-byte integer.A 8-byte integer.JSON object encoding and validation.A Schema that contains Key Schema and Value Schema.LocalDate.LocalDateTime.LocalTime.No schema defined.Protobuf message encoding and decoding.Protobuf native schema base on Descriptor.Simple String encoding with UTF-8.Time.Timestamp. -
方法概要
修饰符和类型方法说明intgetValue()booleanstatic booleanisPrimitiveType(SchemaType type) booleanisStruct()static booleanisStructType(SchemaType type) static SchemaTypevalueOf(int value) Returns the enum constant of this class with the specified name.static SchemaTypeReturns the enum constant of this class with the specified name.static SchemaType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
枚举常量详细资料
-
NONE
No schema defined. -
STRING
Simple String encoding with UTF-8. -
JSON
JSON object encoding and validation. -
PROTOBUF
Protobuf message encoding and decoding. -
AVRO
Serialize and deserialize via avro. -
BOOLEAN
boolean schema defined.- 从以下版本开始:
- 2.3.0
-
INT8
A 8-byte integer. -
INT16
A 16-byte integer. -
INT32
A 32-byte integer. -
INT64
A 64-byte integer. -
FLOAT
A float number. -
DOUBLE
A double number. -
DATE
Date.- 从以下版本开始:
- 2.4.0
-
TIME
Time.- 从以下版本开始:
- 2.4.0
-
TIMESTAMP
Timestamp.- 从以下版本开始:
- 2.4.0
-
KEY_VALUE
A Schema that contains Key Schema and Value Schema. -
INSTANT
Instant. -
LOCAL_DATE
LocalDate. -
LOCAL_TIME
LocalTime. -
LOCAL_DATE_TIME
LocalDateTime. -
PROTOBUF_NATIVE
Protobuf native schema base on Descriptor. -
BYTES
A bytes array. -
AUTO
已过时。Auto Detect Schema Type. -
AUTO_CONSUME
Auto Consume Type. -
AUTO_PUBLISH
Auto Publish Type.
-
-
方法详细资料
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- 返回:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- 如果参数为空值
-
getValue
public int getValue() -
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- 参数:
value- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- 如果参数为空值
-
isPrimitive
public boolean isPrimitive() -
isStruct
public boolean isStruct() -
isPrimitiveType
-
isStructType
-