Spark 公共篇-InterfaceStability

本章內容:

一、源碼

InterfaceStability 類包含三個註解,用於說明被他們註解的類型的穩定性。 ide

/**
 * Annotation to inform users of how much to rely on a particular package,
 * class or method not changing over time.
 */
public class InterfaceStability {

  /**
   * Stable APIs that retain source and binary compatibility within a major release.
   * These interfaces can change from one major release to another major release
   * (e.g. from 1.0 to 2.0).
   */
  @Documented
  public @interface Stable {};

  /**
   * APIs that are meant to evolve towards becoming stable APIs, but are not stable APIs yet.
   * Evolving interfaces can change from one feature release to another release (i.e. 2.1 to 2.2).
   */
  @Documented
  public @interface Evolving {};

  /**
   * Unstable APIs, with no guarantee on stability.
   * Classes that are unannotated are considered Unstable.
   */
  @Documented
  public @interface Unstable {};
}

二、總結

InterfaceStability 類包含三個註解,用於說明被他們註解的類型的穩定性。oop

@InterfaceStability.Stable: 說明主版本是穩定的,不一樣主版本之間可能不兼容。 spa

@InterfaceStability.Evolving: 說明是不停在變化的,不一樣小版本之間也可能不兼容。 .net

@InterfaceStability.Unstable: 說明穩定性沒有任何保證scala

參考文獻:

相關文章
相關標籤/搜索