CoderProviders (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

com.google.cloud.dataflow.sdk.coders

Class CoderProviders



  • public final class CoderProviders
    extends Object
    Static utility methods for working with CoderProviders.
    • Method Detail

      • fromStaticMethods

        public static <T> CoderProvider fromStaticMethods(Class<T> clazz)
        Creates a CoderProvider built from particular static methods of a class that implements Coder. The requirements for this method are precisely the requirements for a Coder class to be usable with DefaultCoder annotations.

        The class must have the following static method:

        
         public static Coder<T> of(TypeDescriptor<T> type)
         
         
      • firstOf

        public static CoderProvider firstOf(CoderProvider... coderProviders)
        Returns a CoderProvider that consults each of the provider coderProviders and returns the first Coder provided.

        Note that the order in which the providers are listed matters: While the set of types handled will be the union of those handled by all of the providers in the list, the actual Coder provided by the first successful provider may differ, and may have inferior properties. For example, not all Coders are deterministic, handle null values, or have comparable performance.


이 페이지가 도움이 되었나요? 평가를 부탁드립니다.

다음에 대한 의견 보내기...

도움이 필요하시나요? 지원 페이지를 방문하세요.