ProtoTranslator (Apache Hadoop YARN CSI 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.csi.translator, interface: ProtoTranslator

Package org.apache.hadoop.yarn.csi.translator

# Interface ProtoTranslator<A,B>

Type Parameters:
  `A` - YARN side internal messages
  `B` - CSI proto messages

All Known Implementing Classes:
  `GetPluginInfoResponseProtoTranslator`, `NodePublishVolumeRequestProtoTranslator`, `NodeUnpublishVolumeRequestProtoTranslator`, `ValidateVolumeCapabilitiesRequestProtoTranslator`, `ValidationVolumeCapabilitiesResponseProtoTranslator`

public interface ProtoTranslator<A,B>
ProtoTranslator converts a YARN side message to CSI proto message and vice versa. Each CSI proto message should have a corresponding YARN side message implementation, and a transformer to convert them one to the other. This layer helps we to hide CSI spec messages from YARN components.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `A`
  `convertFrom(B messageB)`
  Convert message from type B to type A.
  `B`
  `convertTo(A messageA)`
  Convert message from type A to type B.

- ## Method Details

  - ### convertTo

    B convertTo(A messageA) throws org.apache.hadoop.yarn.exceptions.YarnException
    Convert message from type A to type B.
    Parameters:
      `messageA` -
    Returns:
      messageB
    Throws:
      `org.apache.hadoop.yarn.exceptions.YarnException`

  - ### convertFrom

    A convertFrom(B messageB) throws org.apache.hadoop.yarn.exceptions.YarnException
    Convert message from type B to type A.
    Parameters:
      `messageB` -
    Returns:
      messageA
    Throws:
      `org.apache.hadoop.yarn.exceptions.YarnException`