Interface DataTypes
public interface DataTypes
Diffusion data type implementations.
An instance can be obtained by calling
Diffusion.dataTypes()
.
- Since:
- 5.7
- Author:
- DiffusionData Limited
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbinary()
Data type that supports arbitrary binary data.Data type that supports double-precision floating point numbers.<V> DataType<V>
getByClass
(Class<V> valueClass) Obtain aDataType
implementation by class.DataType<?>
Obtain aDataType
implementation by type name.int64()
Data type that supports 64-bit, signed integer values.json()
JSON is "JavaScript Object Notation", a lightweight data-interchange format.recordV2()
Data type that supports data in the form of records and fields.string()
Data type that supports string values.void
validateValueClass
(Class<?> valueClass) Check if a givenvalueClass
is a validDataType
or a superclass of one.
-
Field Details
-
BINARY_DATATYPE_NAME
Binary data type name.- Since:
- 6.0
- See Also:
-
DOUBLE_DATATYPE_NAME
Double data type name.- Since:
- 6.0
- See Also:
-
INT64_DATATYPE_NAME
INT64 data type name.- Since:
- 6.0
- See Also:
-
JSON_DATATYPE_NAME
JSON data type name.- Since:
- 6.0
- See Also:
-
STRING_DATATYPE_NAME
String data type name.- Since:
- 6.0
- See Also:
-
RECORD_V2_DATATYPE_NAME
RecordV2 data type name.- Since:
- 6.0
- See Also:
-
-
Method Details
-
json
JSONDataType json()JSON is "JavaScript Object Notation", a lightweight data-interchange format. See www.json.org.- Returns:
- JSON data type
-
binary
BinaryDataType binary()Data type that supports arbitrary binary data.- Returns:
- Binary data type
-
recordV2
RecordV2DataType recordV2()Data type that supports data in the form of records and fields.- Returns:
- RecordV2 data type
-
doubleFloat
Data type that supports double-precision floating point numbers. (Eight-byte IEEE 754).The integer value is serialized as CBOR-format binary. A serialized value can be
read as
aJSON
instance.The data type does not support binary deltas.
The data type supports null Double instances.
- Returns:
- floating point data type
- Since:
- 6.0
-
int64
Data type that supports 64-bit, signed integer values.The integer value is serialized as CBOR-format binary. A serialized value can be
read as
aJSON
instance.The data type does not support binary deltas.
The data type supports null Long instances.
- Returns:
- integer data type
- Since:
- 6.0
-
string
Data type that supports string values.The string value is serialized as CBOR-format binary. A serialized value can be
read as
aJSON
instance.The data type supports binary deltas.
The data type supports null String instances.
- Returns:
- String data type
- Since:
- 6.0
-
getByName
Obtain aDataType
implementation by type name.- Parameters:
typeName
- the name, as returned byDataType.getTypeName()
- Returns:
- the data type
- Throws:
IllegalArgumentException
- if there is no data type with the nametypeName
-
validateValueClass
Check if a givenvalueClass
is a validDataType
or a superclass of one.- Parameters:
valueClass
- the class- Throws:
IllegalArgumentException
- if there is no data type that supports values of classvalueClass
.
-
getByClass
Obtain aDataType
implementation by class.- Parameters:
valueClass
- the class- Returns:
- the data type
- Throws:
IllegalArgumentException
- if there is no data type that supports values of classvalueClass
IllegalArgumentException
- if there is more than one data type that supports values of the given class, but none is preferred
-