Class KeyValueSchemaCompatibilityCheck
- java.lang.Object
-
- org.apache.pulsar.broker.service.schema.KeyValueSchemaCompatibilityCheck
-
- All Implemented Interfaces:
SchemaCompatibilityCheck
public class KeyValueSchemaCompatibilityCheck extends java.lang.Object implements SchemaCompatibilityCheck
KeyValueSchemaCompatibilityCheckforSchemaType.KEY_VALUE.
-
-
Field Summary
-
Fields inherited from interface org.apache.pulsar.broker.service.schema.SchemaCompatibilityCheck
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description KeyValueSchemaCompatibilityCheck(java.util.Map<org.apache.pulsar.common.schema.SchemaType,SchemaCompatibilityCheck> checkers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckCompatible(java.lang.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)voidcheckCompatible(org.apache.pulsar.common.protocol.schema.SchemaData from, org.apache.pulsar.common.protocol.schema.SchemaData to, org.apache.pulsar.common.policies.data.SchemaCompatibilityStrategy strategy)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)org.apache.pulsar.common.schema.SchemaTypegetSchemaType()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pulsar.broker.service.schema.SchemaCompatibilityCheck
isCompatible, isCompatible
-
-
-
-
Constructor Detail
-
KeyValueSchemaCompatibilityCheck
public KeyValueSchemaCompatibilityCheck(java.util.Map<org.apache.pulsar.common.schema.SchemaType,SchemaCompatibilityCheck> checkers)
-
-
Method Detail
-
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:
getSchemaTypein interfaceSchemaCompatibilityCheck
-
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:
checkCompatiblein interfaceSchemaCompatibilityCheck- Parameters:
from- the current schema i.e. schema that the broker hasto- the future schema i.e. the schema sent by the producerstrategy- the strategy to use when comparing schemas- Throws:
IncompatibleSchemaException
-
checkCompatible
public void checkCompatible(java.lang.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:
checkCompatiblein interfaceSchemaCompatibilityCheck- Parameters:
from- the current schemas i.e. schemas that the broker hasto- the future schema i.e. the schema sent by the producerstrategy- the strategy to use when comparing schemas- Throws:
IncompatibleSchemaException
-
-