Enum ConflictResolutionType
- java.lang.Object
-
- java.lang.Enum<ConflictResolutionType>
-
- com.couchbase.client.java.manager.bucket.ConflictResolutionType
-
- All Implemented Interfaces:
Serializable
,Comparable<ConflictResolutionType>
@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 Summary
Enum Constants Enum Constant Description CUSTOM
Custom bucket conflict resolution.SEQUENCE_NUMBER
Conflict resolution based on the "Sequence Number".TIMESTAMP
Conflict resolution based on a timestamp.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
alias()
static ConflictResolutionType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConflictResolutionType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TIMESTAMP
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.
-
SEQUENCE_NUMBER
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 Detail
-
values
public static ConflictResolutionType[] 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 (ConflictResolutionType c : ConflictResolutionType.values()) System.out.println(c);
- Returns:
- 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.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
alias
public String alias()
-
-