Package org.apache.avro.protobuf
Class ProtoConversions.TimestampNanosConversion
java.lang.Object
org.apache.avro.Conversion<com.google.protobuf.Timestamp>
org.apache.avro.protobuf.ProtoConversions.TimestampNanosConversion
- Enclosing class:
ProtoConversions
public static class ProtoConversions.TimestampNanosConversion
extends Conversion<com.google.protobuf.Timestamp>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.TimestampfromLong(Long nanosFromEpoch, Schema schema, LogicalType type) Class<com.google.protobuf.Timestamp> Return the Java class representing the logical type.Return the logical type this class converts.toLong(com.google.protobuf.Timestamp value, Schema schema, LogicalType type) Methods inherited from class org.apache.avro.Conversion
adjustAndSetValue, fromArray, fromBoolean, fromBytes, fromCharSequence, fromDouble, fromEnumSymbol, fromFixed, fromFloat, fromInt, fromMap, fromRecord, toArray, toBoolean, toBytes, toCharSequence, toDouble, toEnumSymbol, toFixed, toFloat, toInt, toMap, toRecord
-
Constructor Details
-
TimestampNanosConversion
public TimestampNanosConversion()
-
-
Method Details
-
getConvertedType
Description copied from class:ConversionReturn the Java class representing the logical type.- Specified by:
getConvertedTypein classConversion<com.google.protobuf.Timestamp>- Returns:
- a Java class returned by from methods and accepted by to methods
-
getLogicalTypeName
Description copied from class:ConversionReturn the logical type this class converts.- Specified by:
getLogicalTypeNamein classConversion<com.google.protobuf.Timestamp>- Returns:
- a String logical type name
-
fromLong
public com.google.protobuf.Timestamp fromLong(Long nanosFromEpoch, Schema schema, LogicalType type) throws IllegalArgumentException - Overrides:
fromLongin classConversion<com.google.protobuf.Timestamp>- Throws:
IllegalArgumentException
-
toLong
- Overrides:
toLongin classConversion<com.google.protobuf.Timestamp>
-
getRecommendedSchema
- Overrides:
getRecommendedSchemain classConversion<com.google.protobuf.Timestamp>
-