Enum SchemaCompatibilityStrategy
- java.lang.Object
-
- java.lang.Enum<SchemaCompatibilityStrategy>
-
- org.apache.pulsar.common.policies.data.SchemaCompatibilityStrategy
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<SchemaCompatibilityStrategy>
public enum SchemaCompatibilityStrategy extends java.lang.Enum<SchemaCompatibilityStrategy>
Pulsar Schema compatibility strategy.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALWAYS_COMPATIBLEAlways compatible.ALWAYS_INCOMPATIBLEAlways incompatible.BACKWARDMessages written by an old schema can be read by a new schema.BACKWARD_TRANSITIVEBe similar to BACKWARD, BACKWARD_TRANSITIVE ensure all previous version schema can be read by the new schema.FORWARDMessages written by a new schema can be read by an old schema.FORWARD_TRANSITIVEBe similar to FORWARD, FORWARD_TRANSITIVE ensure new schema can be ready by all previous version schema.FULLEquivalent to both FORWARD and BACKWARD.FULL_TRANSITIVEEquivalent to both FORWARD_TRANSITIVE and BACKWARD_TRANSITIVE.UNDEFINEDUndefined.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SchemaCompatibilityStrategyfromAutoUpdatePolicy(SchemaAutoUpdateCompatibilityStrategy strategy)static SchemaCompatibilityStrategyvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static SchemaCompatibilityStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNDEFINED
public static final SchemaCompatibilityStrategy UNDEFINED
Undefined.
-
ALWAYS_INCOMPATIBLE
public static final SchemaCompatibilityStrategy ALWAYS_INCOMPATIBLE
Always incompatible.
-
ALWAYS_COMPATIBLE
public static final SchemaCompatibilityStrategy ALWAYS_COMPATIBLE
Always compatible.
-
BACKWARD
public static final SchemaCompatibilityStrategy BACKWARD
Messages written by an old schema can be read by a new schema.
-
FORWARD
public static final SchemaCompatibilityStrategy FORWARD
Messages written by a new schema can be read by an old schema.
-
FULL
public static final SchemaCompatibilityStrategy FULL
Equivalent to both FORWARD and BACKWARD.
-
BACKWARD_TRANSITIVE
public static final SchemaCompatibilityStrategy BACKWARD_TRANSITIVE
Be similar to BACKWARD, BACKWARD_TRANSITIVE ensure all previous version schema can be read by the new schema.
-
FORWARD_TRANSITIVE
public static final SchemaCompatibilityStrategy FORWARD_TRANSITIVE
Be similar to FORWARD, FORWARD_TRANSITIVE ensure new schema can be ready by all previous version schema.
-
FULL_TRANSITIVE
public static final SchemaCompatibilityStrategy FULL_TRANSITIVE
Equivalent to both FORWARD_TRANSITIVE and BACKWARD_TRANSITIVE.
-
-
Method Detail
-
values
public static SchemaCompatibilityStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SchemaCompatibilityStrategy c : SchemaCompatibilityStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SchemaCompatibilityStrategy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
fromAutoUpdatePolicy
public static SchemaCompatibilityStrategy fromAutoUpdatePolicy(SchemaAutoUpdateCompatibilityStrategy strategy)
-
-