Class AttrHistoricalSingle
java.lang.Object
org.opends.server.replication.plugin.AttrHistorical
org.opends.server.replication.plugin.AttrHistoricalSingle
Stores historical information for single valued attributes. One object of this type is created for each attribute
that was changed in the entry. It allows to record the last time a given value was added, and the last time the
whole attribute was deleted.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassign(List<HistoricalAttributeValue> histVals) Assigns all the historical values to this attribute.voidAssigns all the pre-deduplicated historical values to this attribute.voidattributeDeleteTime(Csn csn) Sets the attribute delete time.booleancontainsAddedValue(ByteString value) Returnstrueif this historical information contains add or replace meta-data for the provided attribute value.Returns the last time when this attribute was deleted.Returns the unmodifiable historical values.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.replayOperation(Csn csn, Entry modifiedEntry, Modification mod) This method will be called when replaying an operation.toString()
-
Constructor Details
-
AttrHistoricalSingle
public AttrHistoricalSingle()
-
-
Method Details
-
getDeleteTime
Description copied from class:AttrHistoricalReturns the last time when this attribute was deleted.- Specified by:
getDeleteTimein classAttrHistorical- Returns:
- the last time when this attribute was deleted
-
getValuesHistorical
Description copied from class:AttrHistoricalReturns the unmodifiable historical values.- Specified by:
getValuesHistoricalin classAttrHistorical- Returns:
- the unmodifiable historical values
-
containsAddedValue
Description copied from class:AttrHistoricalReturnstrueif this historical information contains add or replace meta-data for the provided attribute value.- Specified by:
containsAddedValuein classAttrHistorical- Parameters:
value- The attribute value.- Returns:
trueif this historical information contains add or replace meta-data for the provided attribute value.
-
processLocalOrNonConflictModification
Description copied from class:AttrHistoricalThis 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.
- Specified by:
processLocalOrNonConflictModificationin classAttrHistorical- Parameters:
csn- The CSN of the operation to processmod- The modify operation to process.
-
replayOperation
Description copied from class:AttrHistoricalThis 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.- Specified by:
replayOperationin classAttrHistorical- 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.
-
attributeDeleteTime
Description copied from class:AttrHistoricalSets the attribute delete time.- Specified by:
attributeDeleteTimein classAttrHistorical- Parameters:
csn- the attribute delete time
-
assignPreDeduplicatedValues
Description copied from class:AttrHistoricalAssigns all the pre-deduplicated historical values to this attribute.- Specified by:
assignPreDeduplicatedValuesin classAttrHistorical- Parameters:
histVals- the pre-deduplicated historical values
-
assign
Description copied from class:AttrHistoricalAssigns all the historical values to this attribute.- Specified by:
assignin classAttrHistorical- Parameters:
histVals- the historical values
-
toString
-