Enum ConflictResolutionType

All Implemented Interfaces:
Serializable, Comparable<ConflictResolutionType>, java.lang.constant.Constable

@Volatile public enum ConflictResolutionType extends Enum<ConflictResolutionType>
The type of conflict resolution to configure for the bucket.

A conflict is caused when the source and target copies of an XDCR-replicated document are updated independently of and dissimilarly to one another, each by a local application. The conflict must be resolved, by determining which of the variants should prevail; and then correspondingly saving both documents in identical form. XDCR provides an automated conflict resolution process.

  • Enum Constant Details


      public static final ConflictResolutionType TIMESTAMP
      Conflict resolution based on a timestamp.

      Timestamp-based conflict resolution (often referred to as Last Write Wins, or LWW) uses the document timestamp (stored in the CAS) to resolve conflicts. The timestamps associated with the most recent updates of source and target documents are compared. The document whose update has the more recent timestamp prevails.


      public static final ConflictResolutionType SEQUENCE_NUMBER
      Conflict resolution based on the "Sequence Number".

      Conflicts can be resolved by referring to documents' sequence numbers. Sequence numbers are maintained per document, and are incremented on every document-update. The sequence numbers of source and target documents are compared; and the document with the higher sequence number prevails.

    • CUSTOM

      @Volatile public static final ConflictResolutionType CUSTOM
      Custom bucket conflict resolution.

      In Couchbase Server 7.1, this feature is only available in "developer-preview" mode. See the UI XDCR settings for the custom conflict resolution properties.

  • Method Details

    • values

      public static ConflictResolutionType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ConflictResolutionType valueOf(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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • alias

      public String alias()