Package io.debezium.data.vector
Class FloatVector
java.lang.Object
io.debezium.data.vector.FloatVector
A semantic type for a vector type with 4-byte elemnents.
- Author:
- Jiri Pechanec
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerstatic final Stringstatic int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.kafka.connect.data.SchemaBuilderbuilder()Returns aSchemaBuilderfor a 4-byte vector field.fromLogical(org.apache.kafka.connect.data.Field fieldDfn, byte[] value) Converts a value from its octet stream of 4-byte values to its encoded format - a Connect array represented by list of numbers.fromLogical(org.apache.kafka.connect.data.Schema schema, float[] value) Converts a value from its raw array of floats format to its encoded format - a Connect array represented by list of numbers.fromLogical(org.apache.kafka.connect.data.Schema schema, String value) Converts a value from its logical format -Stringof[x,y,z,...]to its encoded format - a Connect array represented by list of numbers.static org.apache.kafka.connect.data.Schemaschema()Returns aSchemaBuilderfor a 4-byte vector field, with all other default Schema settings.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
LOGICAL_NAME
- See Also:
-
SCHEMA_VERSION
public static int SCHEMA_VERSION
-
-
Constructor Details
-
FloatVector
public FloatVector()
-
-
Method Details
-
builder
public static org.apache.kafka.connect.data.SchemaBuilder builder()Returns aSchemaBuilderfor a 4-byte vector field. You can use the resulting SchemaBuilder to set additional schema settings such as required/optional, default value, and documentation.- Returns:
- the schema builder
-
schema
public static org.apache.kafka.connect.data.Schema schema()Returns aSchemaBuilderfor a 4-byte vector field, with all other default Schema settings.- Returns:
- the schema
- See Also:
-
fromLogical
Converts a value from its logical format -Stringof[x,y,z,...]to its encoded format - a Connect array represented by list of numbers.- Parameters:
schema- of the encoded valuevalue- the value of the vector- Returns:
- the encoded value
-
fromLogical
Converts a value from its raw array of floats format to its encoded format - a Connect array represented by list of numbers.- Parameters:
schema- of the encoded valuevalue- the value of the vector- Returns:
- the encoded value
-
fromLogical
Converts a value from its octet stream of 4-byte values to its encoded format - a Connect array represented by list of numbers.- Parameters:
value- the value of the vectorschema- of the encoded value- Returns:
- the encoded value
-