Class NanoTime

    • Constructor Detail

      • NanoTime

        private NanoTime()
    • Method Detail

      • builder

        public static org.apache.kafka.connect.data.SchemaBuilder builder()
        Returns a SchemaBuilder for a NanoTime. The resulting schema will describe a field with the "io.debezium.time.NanoTime" as the name and INT64 for the literal type storing the number of nanoseconds past midnight.

        You can use the resulting SchemaBuilder to set or override 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 a Schema for a NanoTime but with all other default Schema settings. The schema describes a field with the "io.debezium.time.NanoTime" as the name and INT64 for the literal type storing the number of nanoseconds past midnight.
        Returns:
        the schema
        See Also:
        builder()
      • toNanoOfDay

        public static long toNanoOfDay​(Object value,
                                       boolean acceptLargeValues)
        Get the number of nanoseconds past midnight of the given Duration.
        Parameters:
        value - the duration value; may not be null
        acceptLargeValues - whether to accept values less than 00:00:00 and larger than 24:00:00 or not
        Returns:
        the milliseconds past midnight
        Throws:
        IllegalArgumentException - if the value is not an instance of the acceptable types or it is out of the supported range