Class ProtoDomain
- java.lang.Object
-
- org.apache.beam.sdk.extensions.protobuf.ProtoDomain
-
- All Implemented Interfaces:
java.io.Serializable
public final class ProtoDomain extends java.lang.Object implements java.io.SerializableProtoDomain is a container class for Protobuf descriptors. By using a domain for all descriptors that are related to each other the FileDescriptorSet needs to be serialized only once in the graph.Using a domain also grantees that all Descriptors have object equality, just like statically compiled Proto classes Descriptors. A lot of Java code isn't used to the new DynamicMessages an assume always Object equality. Because of this the domain class is immutable.
ProtoDomains aren't assumed to be used on with normal Message descriptors, only with DynamicMessage descriptors.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUID
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProtoDomainbuildFrom(com.google.protobuf.DescriptorProtos.FileDescriptorSet fileDescriptorSet)static ProtoDomainbuildFrom(com.google.protobuf.Descriptors.Descriptor descriptor)static ProtoDomainbuildFrom(com.google.protobuf.Descriptors.FileDescriptor fileDescriptor)static ProtoDomainbuildFrom(java.io.InputStream inputStream)booleancontains(com.google.protobuf.Descriptors.Descriptor descriptor)booleanequals(@Nullable java.lang.Object o)com.google.protobuf.Descriptors.DescriptorgetDescriptor(java.lang.String fullName)com.google.protobuf.Descriptors.FieldDescriptorgetFieldOptionById(int id)com.google.protobuf.Descriptors.FileDescriptorgetFileDescriptor(java.lang.String name)inthashCode()
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildFrom
public static ProtoDomain buildFrom(com.google.protobuf.Descriptors.Descriptor descriptor)
-
buildFrom
public static ProtoDomain buildFrom(com.google.protobuf.DescriptorProtos.FileDescriptorSet fileDescriptorSet)
-
buildFrom
public static ProtoDomain buildFrom(com.google.protobuf.Descriptors.FileDescriptor fileDescriptor)
-
buildFrom
public static ProtoDomain buildFrom(java.io.InputStream inputStream) throws java.io.IOException
- Throws:
java.io.IOException
-
getFileDescriptor
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor(java.lang.String name)
-
getDescriptor
public com.google.protobuf.Descriptors.Descriptor getDescriptor(java.lang.String fullName)
-
getFieldOptionById
public com.google.protobuf.Descriptors.FieldDescriptor getFieldOptionById(int id)
-
equals
public boolean equals(@Nullable java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
contains
public boolean contains(com.google.protobuf.Descriptors.Descriptor descriptor)
-
-