public class NanoTime extends Object
INT64 number of
nanoseconds since midnight, and for defining a Kafka Connect Schema for time values with no date or timezone
information.Time,
MicroTime,
Date,
Timestamp,
MicroTimestamp,
NanoTimestamp,
ZonedTime,
ZonedTimestamp| Modifier and Type | Field and Description |
|---|---|
private static Duration |
ONE_DAY |
static String |
SCHEMA_NAME |
| Modifier | Constructor and Description |
|---|---|
private |
NanoTime() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.kafka.connect.data.SchemaBuilder |
builder()
Returns a
SchemaBuilder for a NanoTime. |
static org.apache.kafka.connect.data.Schema |
schema()
Returns a Schema for a
NanoTime but with all other default Schema settings. |
static long |
toNanoOfDay(Object value,
boolean acceptLargeValues)
Get the number of nanoseconds past midnight of the given
Duration. |
public static final String SCHEMA_NAME
private static final Duration ONE_DAY
public static org.apache.kafka.connect.data.SchemaBuilder builder()
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.
public static org.apache.kafka.connect.data.Schema schema()
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.builder()public static long toNanoOfDay(Object value, boolean acceptLargeValues)
Duration.value - the duration value; may not be nullacceptLargeValues - whether to accept values less than 00:00:00 and larger than 24:00:00 or notIllegalArgumentException - if the value is not an instance of the acceptable types or it is out of the supported rangeCopyright © 2020 JBoss by Red Hat. All rights reserved.