case class Protocol extends Action with AbstractProtocol with TableFeatureSupport with Product with Serializable

Used to block older clients from reading or writing the log when backwards incompatible changes are made to the protocol. Readers and writers are responsible for checking that they meet the minimum versions before performing any other operations.

This action allows us to explicitly block older clients in the case of a breaking change to the protocol. Absent a protocol change, Clients MUST silently ignore messages and fields that they do not understand.

Note: Please initialize this class using the companion object's apply method, which will assign correct values (Set() vs None) to readerFeatures and writerFeatures.

Linear Supertypes
Serializable, Serializable, Product, Equals, TableFeatureSupport, AbstractProtocol, Action, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Protocol
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. TableFeatureSupport
  7. AbstractProtocol
  8. Action
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def canDowngradeTo(to: Protocol, droppedFeatureName: String): Boolean

    Determine whether this protocol can be safely downgraded to a new protocol to.

    Determine whether this protocol can be safely downgraded to a new protocol to. All the implicit and explicit features between the two protocols need to match, excluding the dropped feature. We also need to take into account that in some cases the downgrade process may add the CheckpointProtectionTableFeature.

    Note, the conditions above also account for cases where we downgrade from table features to legacy protocol versions.

    Definition Classes
    TableFeatureSupport
  6. def canTransitionTo(to: Protocol, op: Operation): Boolean

    True if this protocol can be upgraded or downgraded to the 'to' protocol.

    True if this protocol can be upgraded or downgraded to the 'to' protocol.

    Definition Classes
    TableFeatureSupport
  7. def canUpgradeTo(to: Protocol): Boolean

    Determine whether this protocol can be safely upgraded to a new protocol to.

    Determine whether this protocol can be safely upgraded to a new protocol to. This means:

    • all features supported by this protocol are supported by to.

    Examples regarding feature status:

    • from [appendOnly] to [appendOnly] => allowed.
    • from [appendOnly, changeDataFeed] to [appendOnly] => not allowed.
    • from [appendOnly] to [appendOnly, changeDataFeed] => allowed.
    Definition Classes
    TableFeatureSupport
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. def denormalized: Protocol

    Protocol denormalization is the process of converting a legacy protocol to the the equivalent table features protocol.

    Protocol denormalization is the process of converting a legacy protocol to the the equivalent table features protocol. This is the inverse of protocol normalization. It can be used to allow operations on legacy protocols that yield result which cannot be represented anymore by a legacy protocol.

    Definition Classes
    TableFeatureSupport
  10. def denormalizedNormalized: Protocol

    Helper method that applies both denormalization and normalization.

    Helper method that applies both denormalization and normalization. This can be used to normalize invalid legacy protocols such as (2, 3), (1, 5). A legacy protocol is invalid when the version numbers are higher than required to support the implied feature set.

    Definition Classes
    TableFeatureSupport
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def getMinReaderVersion(): Int
    Definition Classes
    Protocol → AbstractProtocol
  15. def getMinWriterVersion(): Int
    Definition Classes
    Protocol → AbstractProtocol
  16. def getReaderFeatures(): Set[String]
    Definition Classes
    Protocol → AbstractProtocol
  17. def getWriterFeatures(): Set[String]
    Definition Classes
    Protocol → AbstractProtocol
  18. lazy val implicitlyAndExplicitlySupportedFeatures: Set[TableFeature]

    Get all features that are supported by this protocol, implicitly and explicitly.

    Get all features that are supported by this protocol, implicitly and explicitly. When the protocol supports table features, this method returns the same set of features as readerAndWriterFeatureNames; when the protocol does not support table features, this method becomes equivalent to implicitlySupportedFeatures.

    Definition Classes
    TableFeatureSupport
    Annotations
    @JsonIgnore()
  19. lazy val implicitlySupportedFeatures: Set[TableFeature]

    Get all features that are implicitly supported by this protocol, for example, Protocol(1,2) implicitly supports appendOnly and invariants.

    Get all features that are implicitly supported by this protocol, for example, Protocol(1,2) implicitly supports appendOnly and invariants. When this protocol is capable of requiring writer features, no feature can be implicitly supported.

    Definition Classes
    TableFeatureSupport
    Annotations
    @JsonIgnore()
  20. def isFeatureSupported(feature: TableFeature): Boolean

    Check if a feature is supported by this protocol.

    Check if a feature is supported by this protocol. This means either (a) the protocol does not support table features and implicitly supports the feature, or (b) the protocol supports table features and references the feature.

    Definition Classes
    TableFeatureSupport
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. def json: String
    Definition Classes
    Action
  23. def merge(others: Protocol*): Protocol

    Merge this protocol with multiple protocols to have the highest reader and writer versions plus all explicitly and implicitly supported features.

    Merge this protocol with multiple protocols to have the highest reader and writer versions plus all explicitly and implicitly supported features.

    Definition Classes
    TableFeatureSupport
  24. val minReaderVersion: Int
  25. val minWriterVersion: Int
  26. lazy val nativeReaderAndWriterFeatures: Seq[TableFeature]

    A sequence of native TableFeatures.

    A sequence of native TableFeatures. This is derived by filtering out all explicitly supported legacy features.

    Definition Classes
    TableFeatureSupport
    Annotations
    @JsonIgnore()
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def normalized: Protocol

    Protocol normalization is the process of converting a table features protocol to the weakest possible form.

    Protocol normalization is the process of converting a table features protocol to the weakest possible form. This primarily refers to converting a table features protocol to a legacy protocol. A Table Features protocol can be represented with the legacy representation only when the features set of the former exactly matches a legacy protocol.

    Normalization can also decrease the reader version of a table features protocol when it is higher than necessary.

    For example: (1, 7, AppendOnly, Invariants, CheckConstraints) -> (1, 3) (3, 7, RowTracking) -> (1, 7, RowTracking)

    Definition Classes
    TableFeatureSupport
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. lazy val readerAndWriterFeatureNames: Set[String]

    Get a set of all feature names in this protocol's readerFeatures and writerFeatures field.

    Get a set of all feature names in this protocol's readerFeatures and writerFeatures field. Returns an empty set when this protocol supports none of reader and writer features.

    Definition Classes
    TableFeatureSupport
    Annotations
    @JsonIgnore()
  32. lazy val readerAndWriterFeatures: Seq[TableFeature]

    Same as above but returns a sequence of TableFeature instead of a set of feature names.

    Same as above but returns a sequence of TableFeature instead of a set of feature names.

    Definition Classes
    TableFeatureSupport
    Annotations
    @JsonIgnore()
  33. def readerFeatureNames: Set[String]

    Get all feature names in this protocol's readerFeatures field.

    Get all feature names in this protocol's readerFeatures field. Returns an empty set when this protocol does not support reader features.

    Definition Classes
    TableFeatureSupport
  34. val readerFeatures: Option[Set[String]]
  35. def removeFeature(targetFeature: TableFeature): Protocol

    Remove feature wrapper for removing either Reader/Writer or Writer features.

    Remove feature wrapper for removing either Reader/Writer or Writer features. We assume the feature exists in the protocol. There is a relevant validation at AlterTableDropFeatureDeltaCommand. We also require targetFeature is removable.

    After removing the feature we normalize the protocol.

    Definition Classes
    TableFeatureSupport
  36. lazy val simpleString: String

    Return a reader-friendly string representation of this Protocol.

    Return a reader-friendly string representation of this Protocol.

    Returns the protocol versions and referenced features when the protocol does support table features, such as 3,7,{},{appendOnly} and 2,7,None,{appendOnly}. Otherwise returns only the protocol version such as 2,6.

    Annotations
    @JsonIgnore()
  37. def supportsReaderFeatures: Boolean

    Check if this protocol is capable of adding features into its readerFeatures field.

    Check if this protocol is capable of adding features into its readerFeatures field.

    Definition Classes
    TableFeatureSupport
  38. def supportsWriterFeatures: Boolean

    Check if this protocol is capable of adding features into its writerFeatures field.

    Check if this protocol is capable of adding features into its writerFeatures field.

    Definition Classes
    TableFeatureSupport
  39. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  40. def toString(): String
    Definition Classes
    Protocol → AnyRef → Any
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  44. def withFeature(feature: TableFeature): Protocol

    Get a new Protocol object that has feature supported.

    Get a new Protocol object that has feature supported. Writer-only features will be added to writerFeatures field, and reader-writer features will be added to readerFeatures and writerFeatures fields.

    If feature is already implicitly supported in the current protocol's legacy reader or writer protocol version, the new protocol will not modify the original protocol version, i.e., the feature will not be explicitly added to the protocol's readerFeatures or writerFeatures. This is to avoid unnecessary protocol upgrade for feature that it already supports.

    Definition Classes
    TableFeatureSupport
  45. def withFeatures(features: Iterable[TableFeature]): Protocol

    Get a new Protocol object with multiple features supported.

    Get a new Protocol object with multiple features supported.

    See the documentation of withFeature for more information.

    Definition Classes
    TableFeatureSupport
  46. def wrap: SingleAction
    Definition Classes
    ProtocolAction
  47. def writerFeatureNames: Set[String]

    Get a set of all feature names in this protocol's writerFeatures field.

    Get a set of all feature names in this protocol's writerFeatures field. Returns an empty set when this protocol does not support writer features.

    Definition Classes
    TableFeatureSupport
  48. val writerFeatures: Option[Set[String]]

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from TableFeatureSupport

Inherited from AbstractProtocol

Inherited from Action

Inherited from AnyRef

Inherited from Any

Ungrouped