Record Class HistoricalAttributeValue
java.lang.Object
java.lang.Record
org.opends.server.replication.plugin.HistoricalAttributeValue
- Record Components:
attributeDescription- the attribute description of this HistVal. Can benullif the HistVal was generated for an ADD Operationoperation- the type of historical operation on the entrycsn- the CSN of this HistValhistKey- the type modification (add/repl/delete) on an attribute value. Only meaningful whenoperationis equal toHistoricalAttributeValue.HistOperation.ATTRIBUTE_MODIFICATION.attributeValue- the attribute value added/replaced/deleted. Only meaningful whenoperationis equal toHistoricalAttributeValue.HistOperation.ATTRIBUTE_MODIFICATION.
public record HistoricalAttributeValue(AttributeDescription attributeDescription, HistoricalAttributeValue.HistOperation operation, Csn csn, HistAttrModificationKey histKey, ByteString attributeValue)
extends Record
Encodes a single ds-sync-hist attribute value of an entry.
This is an internal representation of the operations that happened to an entry during its lifetime.
It encodes/decodes from the String form stored in the DB attribute from/to the internal usable form.
Here are examples of historical attribute values:
description:00000108b3a65541000000000001:add:added_valuedescription;FR;France:00000108b3a65541000000000001:add:added_valuedescription:00000108b3a6cbb8000000000001:del:deleted_valuedescription:00000108b3a6cbb8000000000001:repl:new_valuedescription:00000108b3a6cbb8000000000001:attrDeldescription:00000108b3a65541000000000001:adddn:00000108b3a65541000000000001:add(ADD operation)dn:00000108b3a65541000000000001:moddn(MODIFYDN operation)
- token[0] will contain the attribute description.
- Options are stored with the attribute names using '
;' as a separator
- Options are stored with the attribute names using '
- token[1] will contain the CSN
- token[2] will contain the type of historical information
- token[3] will contain the attribute value
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the operation performed on the entry for a given ds-sync-hist value. -
Constructor Summary
ConstructorsConstructorDescriptionHistoricalAttributeValue(AttributeDescription attributeDescription, HistoricalAttributeValue.HistOperation operation, Csn csn, HistAttrModificationKey histKey, ByteString attributeValue) Canonical constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributeDescriptionrecord component.static HistoricalAttributeValueattributeModification(AttributeDescription attrDesc, HistAttrModificationKey histKey, Csn csn, ByteString attributeValue) Returns a ds-sync-hist value encoding a modification that adds/replaces with/deletes an attribute value.Returns the value of theattributeValuerecord component.csn()Returns the value of thecsnrecord component.final booleanIndicates whether some other object is "equal to" this one.Generate a Modification equivalent to this value of the historical attribute.final inthashCode()Returns a hash code value for this object.histKey()Returns the value of thehistKeyrecord component.Returns the value of theoperationrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
HistoricalAttributeValue
public HistoricalAttributeValue(AttributeDescription attributeDescription, HistoricalAttributeValue.HistOperation operation, Csn csn, HistAttrModificationKey histKey, ByteString attributeValue) Canonical constructor.
-
-
Method Details
-
attributeModification
public static HistoricalAttributeValue attributeModification(AttributeDescription attrDesc, HistAttrModificationKey histKey, Csn csn, ByteString attributeValue) Returns a ds-sync-hist value encoding a modification that adds/replaces with/deletes an attribute value.- Returns:
- a ds-sync-hist value encoding a modification that adds/replaces with/deletes an attribute value
-
histKey
-
attributeValue
Returns the value of theattributeValuerecord component.- Returns:
- the value of the
attributeValuerecord component
-
generateMod
Generate a Modification equivalent to this value of the historical attribute.- Returns:
- A modification equivalent to this value of the historical attribute.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
attributeDescription
Returns the value of theattributeDescriptionrecord component.- Returns:
- the value of the
attributeDescriptionrecord component
-
operation
-
csn
-