Package org.apache.kafka.connect.data
Enum Schema.Type
- java.lang.Object
-
- java.lang.Enum<Schema.Type>
-
- org.apache.kafka.connect.data.Schema.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<Schema.Type>
- Enclosing interface:
- Schema
public static enum Schema.Type extends Enum<Schema.Type>
The type of a schema. These only include the core types; logical types must be determined by checking the schema name.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARRAY
An ordered sequence of elements, each of which shares the same type.BOOLEAN
Boolean value (true or false)BYTES
Sequence of unsigned 8-bit bytesFLOAT32
32-bit IEEE 754 floating point numberFLOAT64
64-bit IEEE 754 floating point numberINT16
16-bit signed integer Note that if you have an unsigned 16-bit data source,INT32
will be required to safely capture all valid valuesINT32
32-bit signed integer Note that if you have an unsigned 32-bit data source,INT64
will be required to safely capture all valid valuesINT64
INT8
8-bit signed integer Note that if you have an unsigned 8-bit data source,INT16
will be required to safely capture all valid valuesMAP
A mapping from keys to values.STRING
Character string that supports all Unicode characters.STRUCT
A structured record containing a set of named fields, each field using a fixed, independentSchema
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
boolean
isPrimitive()
static Schema.Type
valueOf(String name)
Returns the enum constant of this type with the specified name.static Schema.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INT8
public static final Schema.Type INT8
8-bit signed integer Note that if you have an unsigned 8-bit data source,INT16
will be required to safely capture all valid values
-
INT16
public static final Schema.Type INT16
16-bit signed integer Note that if you have an unsigned 16-bit data source,INT32
will be required to safely capture all valid values
-
INT32
public static final Schema.Type INT32
32-bit signed integer Note that if you have an unsigned 32-bit data source,INT64
will be required to safely capture all valid values
-
INT64
public static final Schema.Type INT64
-
FLOAT32
public static final Schema.Type FLOAT32
32-bit IEEE 754 floating point number
-
FLOAT64
public static final Schema.Type FLOAT64
64-bit IEEE 754 floating point number
-
BOOLEAN
public static final Schema.Type BOOLEAN
Boolean value (true or false)
-
STRING
public static final Schema.Type STRING
Character string that supports all Unicode characters. Note that this does not imply any specific encoding (e.g. UTF-8) as this is an in-memory representation.
-
BYTES
public static final Schema.Type BYTES
Sequence of unsigned 8-bit bytes
-
ARRAY
public static final Schema.Type ARRAY
An ordered sequence of elements, each of which shares the same type.
-
MAP
public static final Schema.Type MAP
A mapping from keys to values. Both keys and values can be arbitrarily complex types, including complex types such asStruct
.
-
STRUCT
public static final Schema.Type STRUCT
A structured record containing a set of named fields, each field using a fixed, independentSchema
.
-
-
Method Detail
-
values
public static Schema.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Schema.Type c : Schema.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Schema.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getName
public String getName()
-
isPrimitive
public boolean isPrimitive()
-
-