Class SbeSchema

  • All Implemented Interfaces:
    java.io.Serializable

    @Experimental(SCHEMAS)
    public final class SbeSchema
    extends java.lang.Object
    implements java.io.Serializable
    Represents an SBE schema.

    The schema represents a single SBE message. If the XML schema contains more than one message, then a new instance must be created for each message that the pipeline will work with.

    The currently supported ways of generating a schema are:

    • Through an intermediate representation (Ir).

    Intermediate Representation

    An Ir allows for a reflection-less way of getting a very accurate representation of the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some ambiguities, such as which message to base the schema around, passing SbeSchema.IrOptions is required.

    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SbeSchema.IrOptions
      Options for configuring schema generation from an Ir.
    • Method Detail

      • fromIr

        public static SbeSchema fromIr​(uk.co.real_logic.sbe.ir.Ir ir,
                                       SbeSchema.IrOptions irOptions)
        Creates a new SbeSchema from the given intermediate representation.

        This makes no guarantees about the state of the returned instance. That is, it may or may not have the generated SBE schema representation, and it may or may not have translated the SBE schema into a Beam schema.

        Parameters:
        ir - the intermediate representation of the SBE schema. Modifications to the passed-in value will not be reflected in the returned instance.
        irOptions - options for configuring how to deal with cases where the desired behavior is ambiguous.
        Returns:
        a new SbeSchema instance
      • getIr

        public @Nullable uk.co.real_logic.sbe.ir.Ir getIr()
      • getSbeFields

        public org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList<org.apache.beam.sdk.extensions.sbe.SbeField> getSbeFields()