Class KeyValueSchemaCompatibilityCheck

java.lang.Object
org.apache.pulsar.broker.service.schema.KeyValueSchemaCompatibilityCheck
All Implemented Interfaces:
SchemaCompatibilityCheck

public class KeyValueSchemaCompatibilityCheck extends Object implements SchemaCompatibilityCheck
KeyValueSchemaCompatibilityCheck for SchemaType.KEY_VALUE.
  • Constructor Details

    • KeyValueSchemaCompatibilityCheck

      public KeyValueSchemaCompatibilityCheck(Map<org.apache.pulsar.common.schema.SchemaType,SchemaCompatibilityCheck> checkers)
  • Method Details

    • decodeKeyValueSchemaData

      public static org.apache.pulsar.common.schema.KeyValue<org.apache.pulsar.common.protocol.schema.SchemaData,org.apache.pulsar.common.protocol.schema.SchemaData> decodeKeyValueSchemaData(org.apache.pulsar.common.protocol.schema.SchemaData schemaData)
    • getSchemaType

      public org.apache.pulsar.common.schema.SchemaType getSchemaType()
      Specified by:
      getSchemaType in interface SchemaCompatibilityCheck
    • checkCompatible

      public void checkCompatible(org.apache.pulsar.common.protocol.schema.SchemaData from, org.apache.pulsar.common.protocol.schema.SchemaData to, org.apache.pulsar.common.policies.data.SchemaCompatibilityStrategy strategy) throws IncompatibleSchemaException
      Specified by:
      checkCompatible in interface SchemaCompatibilityCheck
      Parameters:
      from - the current schema i.e. schema that the broker has
      to - the future schema i.e. the schema sent by the producer
      strategy - the strategy to use when comparing schemas
      Throws:
      IncompatibleSchemaException
    • checkCompatible

      public void checkCompatible(Iterable<org.apache.pulsar.common.protocol.schema.SchemaData> from, org.apache.pulsar.common.protocol.schema.SchemaData to, org.apache.pulsar.common.policies.data.SchemaCompatibilityStrategy strategy) throws IncompatibleSchemaException
      Specified by:
      checkCompatible in interface SchemaCompatibilityCheck
      Parameters:
      from - the current schemas i.e. schemas that the broker has
      to - the future schema i.e. the schema sent by the producer
      strategy - the strategy to use when comparing schemas
      Throws:
      IncompatibleSchemaException