Enum Class SchemaCompatibilityStrategy
java.lang.Object
java.lang.Enum<SchemaCompatibilityStrategy>
org.apache.pulsar.common.policies.data.SchemaCompatibilityStrategy
- All Implemented Interfaces:
Serializable
,Comparable<SchemaCompatibilityStrategy>
,Constable
Pulsar Schema compatibility strategy.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAlways compatible.Always incompatible.Messages written by an old schema can be read by a new schema.Be similar to BACKWARD, BACKWARD_TRANSITIVE ensure all previous version schema can be read by the new schema.Messages written by a new schema can be read by an old schema.Be similar to FORWARD, FORWARD_TRANSITIVE ensure new schema can be ready by all previous version schema.Equivalent to both FORWARD and BACKWARD.Equivalent to both FORWARD_TRANSITIVE and BACKWARD_TRANSITIVE.Undefined. -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaCompatibilityStrategy
static boolean
isUndefined
(SchemaCompatibilityStrategy strategy) static SchemaCompatibilityStrategy
Returns the enum constant of this class with the specified name.static SchemaCompatibilityStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNDEFINED
Undefined. -
ALWAYS_INCOMPATIBLE
Always incompatible. -
ALWAYS_COMPATIBLE
Always compatible. -
BACKWARD
Messages written by an old schema can be read by a new schema. -
FORWARD
Messages written by a new schema can be read by an old schema. -
FULL
Equivalent to both FORWARD and BACKWARD. -
BACKWARD_TRANSITIVE
Be similar to BACKWARD, BACKWARD_TRANSITIVE ensure all previous version schema can be read by the new schema. -
FORWARD_TRANSITIVE
Be similar to FORWARD, FORWARD_TRANSITIVE ensure new schema can be ready by all previous version schema. -
FULL_TRANSITIVE
Equivalent to both FORWARD_TRANSITIVE and BACKWARD_TRANSITIVE.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isUndefined
-
fromAutoUpdatePolicy
public static SchemaCompatibilityStrategy fromAutoUpdatePolicy(SchemaAutoUpdateCompatibilityStrategy strategy)
-