Class AttrHistorical
java.lang.Object
org.opends.server.replication.plugin.AttrHistorical
- Direct Known Subclasses:
AttrHistoricalMultiple, AttrHistoricalSingle
public abstract sealed class AttrHistorical
extends Object
permits AttrHistoricalSingle, AttrHistoricalMultiple
Stores how the attribute values evolved over time for a specific attribute type. It is used to resolve modify
conflicts for a specific attribute type. It represents the portion of the
ds-sync-hist attribute
dedicated to a specific attribute type.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidassign(List<HistoricalAttributeValue> histVals) Assigns all the historical values to this attribute.abstract voidAssigns all the pre-deduplicated historical values to this attribute.abstract voidattributeDeleteTime(Csn csn) Sets the attribute delete time.abstract booleancontainsAddedValue(ByteString value) Returnstrueif this historical information contains add or replace meta-data for the provided attribute value.abstract CsnReturns the last time when this attribute was deleted.abstract Collection<AttrValueHistorical> Returns the unmodifiable historical values.abstract voidThis method calculates the historical information and update the hist attribute to store the historical information for modify operation that does not conflict with previous operation.abstract ModificationreplayOperation(Csn csn, Entry modifiedEntry, Modification mod) This method will be called when replaying an operation.
-
Constructor Details
-
AttrHistorical
public AttrHistorical()
-
-
Method Details
-
replayOperation
This method will be called when replaying an operation. It should use whatever historical information is stored in this class to solve the conflict and return the modification that will actually have to be replayed.- Parameters:
csn- The CSN associated to the operation.modifiedEntry- The entry modified by this operation.mod- The modification.- Returns:
- The modification which should be replayed, or
nullif the modification should not be replayed.
-
processLocalOrNonConflictModification
This method calculates the historical information and update the hist attribute to store the historical information for modify operation that does not conflict with previous operation. This is the usual path and should therefore be optimized.It does not check if the operation to process is conflicting or not with previous operations. The caller is responsible for this.
- Parameters:
csn- The CSN of the operation to processmod- The modify operation to process.
-
getValuesHistorical
Returns the unmodifiable historical values.- Returns:
- the unmodifiable historical values
-
containsAddedValue
Returnstrueif this historical information contains add or replace meta-data for the provided attribute value.- Parameters:
value- The attribute value.- Returns:
trueif this historical information contains add or replace meta-data for the provided attribute value.
-
getDeleteTime
Returns the last time when this attribute was deleted.- Returns:
- the last time when this attribute was deleted
-
attributeDeleteTime
Sets the attribute delete time.- Parameters:
csn- the attribute delete time
-
assign
Assigns all the historical values to this attribute.- Parameters:
histVals- the historical values
-
assignPreDeduplicatedValues
Assigns all the pre-deduplicated historical values to this attribute.- Parameters:
histVals- the pre-deduplicated historical values
-