Package org.apache.avro.protobuf
Class ProtoConversions.TimestampMicrosConversion
java.lang.Object
org.apache.avro.Conversion<com.google.protobuf.Timestamp>
org.apache.avro.protobuf.ProtoConversions.TimestampMicrosConversion
- Enclosing class:
ProtoConversions
public static class ProtoConversions.TimestampMicrosConversion
extends Conversion<com.google.protobuf.Timestamp>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.TimestampfromLong(Long microsFromEpoch, 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
-
TimestampMicrosConversion
public TimestampMicrosConversion()
-
-
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 microsFromEpoch, 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>
-