枚举 SchemaCompatibilityStrategy
- java.lang.Object
-
- java.lang.Enum<SchemaCompatibilityStrategy>
-
- org.apache.pulsar.common.policies.data.SchemaCompatibilityStrategy
-
- 所有已实现的接口:
java.io.Serializable,java.lang.Comparable<SchemaCompatibilityStrategy>
public enum SchemaCompatibilityStrategy extends java.lang.Enum<SchemaCompatibilityStrategy>
Pulsar Schema compatibility strategy.
-
-
枚举常量概要
枚举常量 枚举常量 说明 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.
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static SchemaCompatibilityStrategyfromAutoUpdatePolicy(SchemaAutoUpdateCompatibilityStrategy strategy)static booleanisUndefined(SchemaCompatibilityStrategy strategy)static SchemaCompatibilityStrategyvalueOf(java.lang.String name)返回带有指定名称的该类型的枚举常量。static SchemaCompatibilityStrategy[]values()按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
-
-
-
枚举常量详细资料
-
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.
-
-
方法详细资料
-
values
public static SchemaCompatibilityStrategy[] values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:for (SchemaCompatibilityStrategy c : SchemaCompatibilityStrategy.values()) System.out.println(c);
- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
public static SchemaCompatibilityStrategy valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
java.lang.IllegalArgumentException- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException- 如果参数为空值
-
isUndefined
public static boolean isUndefined(SchemaCompatibilityStrategy strategy)
-
fromAutoUpdatePolicy
public static SchemaCompatibilityStrategy fromAutoUpdatePolicy(SchemaAutoUpdateCompatibilityStrategy strategy)
-
-