public final class ProtoTranslatorFactory extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static <A,B> ProtoTranslator<A,B> | getTranslator(Class<A> yarnProto,
             Class<B> csiProto)Get a  ProtoTranslatorbased on the given input message
 types. | 
public static <A,B> ProtoTranslator<A,B> getTranslator(Class<A> yarnProto, Class<B> csiProto)
ProtoTranslator based on the given input message
 types. If the type is not supported, a IllegalArgumentException
 will be thrown. When adding more transformers to this factory class,
 note each transformer works exactly for one message to another
 (and vice versa). For each type of the message, make sure there is
 a corresponding unit test added, such as
 TestValidateVolumeCapabilitiesRequest.A - yarn proto messageB - CSI proto messageyarnProto - yarn proto messagecsiProto - CSI proto messageIllegalArgumentException - when given types are not supportedCopyright © 2008–2023 Apache Software Foundation. All rights reserved.