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 Details

  • 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

      DataType<Double> 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 a JSON 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

      DataType<Long> 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 a JSON instance.

      The data type does not support binary deltas.

      The data type supports null Long instances.

      Returns:
      integer data type
      Since:
      6.0
    • string

      DataType<String> string()
      Data type that supports string values.

      The string value is serialized as CBOR-format binary. A serialized value can be read as a JSON instance.

      The data type supports binary deltas.

      The data type supports null String instances.

      Returns:
      String data type
      Since:
      6.0
    • getByName

      DataType<?> getByName(String typeName)
      Obtain a DataType implementation by type name.
      Parameters:
      typeName - the name, as returned by DataType.getTypeName()
      Returns:
      the data type
      Throws:
      IllegalArgumentException - if there is no data type with the name typeName
    • validateValueClass

      void validateValueClass(Class<?> valueClass)
      Check if a given valueClass is a valid DataType or a superclass of one.
      Parameters:
      valueClass - the class
      Throws:
      IllegalArgumentException - if there is no data type that supports values of class valueClass.
    • getByClass

      <V> DataType<V> getByClass(Class<V> valueClass)
      Obtain a DataType implementation by class.
      Parameters:
      valueClass - the class
      Returns:
      the data type
      Throws:
      IllegalArgumentException - if there is no data type that supports values of class valueClass
      IllegalArgumentException - if there is more than one data type that supports values of the given class, but none is preferred