public class NanoDuration extends Object
INT64
number of nanosecond, and for defining a Kafka Connect Schema for duration values.| Modifier and Type | Field and Description |
|---|---|
static String |
SCHEMA_NAME |
| Modifier | Constructor and Description |
|---|---|
private |
NanoDuration() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.kafka.connect.data.SchemaBuilder |
builder()
Returns a
SchemaBuilder for a NanoDuration. |
static long |
durationNanos(int years,
int months,
int days,
int hours,
int minutes,
long seconds)
Converts a number of time units to a duration in nanoseconds.
|
static long |
durationNanos(int years,
int months,
int days,
int hours,
int minutes,
long seconds,
long nanos)
Converts a number of time units to a duration in nanoseconds.
|
static org.apache.kafka.connect.data.Schema |
schema()
Returns a Schema for a
NanoDuration but with all other default Schema settings. |
public static final String SCHEMA_NAME
public static org.apache.kafka.connect.data.SchemaBuilder builder()
SchemaBuilder for a NanoDuration. The resulting schema will describe a field
with the "io.debezium.time.NanoDuration" as the name and SchemaBuilder.int64() ()} INT64} for the literal
type storing the number of nanoseconds for that duration.
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()
NanoDuration but with all other default Schema settings. The schema describes a field
with the "io.debezium.time.NanoDuration" as the name and SchemaBuilder.int64() ()} INT64} for the literal
type storing the number of nanoseconds.builder()public static long durationNanos(int years,
int months,
int days,
int hours,
int minutes,
long seconds,
long nanos)
years - a number of yearsmonths - a number of monthsdays - a number of dayshours - a number of hoursminutes - a number of minutesseconds - a number of secondsnanos - a number of nanosecondspublic static long durationNanos(int years,
int months,
int days,
int hours,
int minutes,
long seconds)
years - a number of yearsmonths - a number of monthsdays - a number of dayshours - a number of hoursminutes - a number of minutesseconds - a number of secondsCopyright © 2021 JBoss by Red Hat. All rights reserved.