DelegateCoder (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 DelegateCoder<T,IntermediateT>

  • Type Parameters:
    T - The type of objects coded by this Coder.
    IntermediateT - The type of objects a T will be converted to for coding.
    All Implemented Interfaces:
    Coder<T>, Serializable
    Direct Known Subclasses:
    StringDelegateCoder


    public class DelegateCoder<T,IntermediateT>
    extends CustomCoder<T>
    A DelegateCoder<T, IntermediateT> wraps a Coder for IntermediateT and encodes/decodes values of type T by converting to/from IntermediateT and then encoding/decoding using the underlying Coder<IntermediateT>.

    The conversions from T to IntermediateT and vice versa must be supplied as DelegateCoder.CodingFunction, a serializable function that may throw any Exception. If a thrown exception is an instance of CoderException or IOException, it will be re-thrown, otherwise it will be wrapped as a CoderException.

    See Also:
    Serialized Form


Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Dataflow