public class FederationProtocolPBTranslator<P extends org.apache.hadoop.thirdparty.protobuf.GeneratedMessageV3,B extends org.apache.hadoop.thirdparty.protobuf.Message.Builder,T extends org.apache.hadoop.thirdparty.protobuf.MessageOrBuilder>
extends java.lang.Object
| Constructor | Description |
|---|---|
FederationProtocolPBTranslator(java.lang.Class<P> protoType) |
| Modifier and Type | Method | Description |
|---|---|---|
P |
build() |
Get the serialized proto object.
|
B |
getBuilder() |
Create or return the cached protobuf builder for this translator.
|
T |
getProtoOrBuilder() |
Returns an interface to access data stored within this object.
|
void |
readInstance(java.lang.String base64String) |
Read instance from base64 data.
|
void |
setProto(org.apache.hadoop.thirdparty.protobuf.Message p) |
Called if this translator is to be created from an existing protobuf byte
stream.
|
public FederationProtocolPBTranslator(java.lang.Class<P> protoType)
public void setProto(org.apache.hadoop.thirdparty.protobuf.Message p)
throws java.lang.IllegalArgumentException
p - The existing proto object to use to initialize the translator.java.lang.IllegalArgumentException - If the given proto message is not instance of the class of
the proto handler this translator holds.public B getBuilder()
public P build()
public T getProtoOrBuilder()
public void readInstance(java.lang.String base64String)
throws java.io.IOException
base64String - String containing Base64 data.java.io.IOException - If the protobuf message build fails.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.