Class SbeSchema
- java.lang.Object
-
- org.apache.beam.sdk.extensions.sbe.SbeSchema
-
- All Implemented Interfaces:
java.io.Serializable
@Experimental(SCHEMAS) public final class SbeSchema extends java.lang.Object implements java.io.SerializableRepresents 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
Irallows 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, passingSbeSchema.IrOptionsis required.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSbeSchema.IrOptionsOptions for configuring schema generation from anIr.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SbeSchemafromIr(uk.co.real_logic.sbe.ir.Ir ir, SbeSchema.IrOptions irOptions)Creates a newSbeSchemafrom the given intermediate representation.@Nullable uk.co.real_logic.sbe.ir.IrgetIr()@Nullable SbeSchema.IrOptionsgetIrOptions()org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList<org.apache.beam.sdk.extensions.sbe.SbeField>getSbeFields()
-
-
-
Method Detail
-
fromIr
public static SbeSchema fromIr(uk.co.real_logic.sbe.ir.Ir ir, SbeSchema.IrOptions irOptions)
Creates a newSbeSchemafrom 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
SbeSchemainstance
-
getIr
public @Nullable uk.co.real_logic.sbe.ir.Ir getIr()
-
getIrOptions
public @Nullable SbeSchema.IrOptions getIrOptions()
-
getSbeFields
public org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList<org.apache.beam.sdk.extensions.sbe.SbeField> getSbeFields()
-
-