Class AttrHistoricalSingle
- java.lang.Object
-
- org.opends.server.replication.plugin.AttrHistorical
-
- org.opends.server.replication.plugin.AttrHistoricalSingle
-
public class AttrHistoricalSingle extends AttrHistorical
This class is used to store 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 Constructor Description AttrHistoricalSingle(AttributeType attributeType)Builds anAttrHistoricalSingleobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(org.opends.server.replication.plugin.HistoricalAttributeValue histVal)Assign the provided historical value to this object.CSNgetDeleteTime()Returns the last time when this attribute was deleted.Set<AttrValueHistorical>getValuesHistorical()Get the historical informations for this attribute Info.voidprocessLocalOrNonConflictModification(CSN csn, Modification mod)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.booleanreplayOperation(Iterator<Modification> modsIterator, CSN csn, Entry modifiedEntry, Modification mod)This method will be called when replaying an operation.StringtoString()-
Methods inherited from class org.opends.server.replication.plugin.AttrHistorical
createAttributeHistorical
-
-
-
-
Constructor Detail
-
AttrHistoricalSingle
public AttrHistoricalSingle(AttributeType attributeType)
Builds anAttrHistoricalSingleobject.- Parameters:
attributeType- the attribute type for this historical value
-
-
Method Detail
-
getDeleteTime
public CSN 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
public Set<AttrValueHistorical> getValuesHistorical()
Description copied from class:AttrHistoricalGet the historical informations for this attribute Info.- Specified by:
getValuesHistoricalin classAttrHistorical- Returns:
- the historical informations
-
processLocalOrNonConflictModification
public void processLocalOrNonConflictModification(CSN csn, Modification mod)
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
public boolean replayOperation(Iterator<Modification> modsIterator, CSN csn, Entry modifiedEntry, Modification mod)
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 modify the mod and the mods iterator accordingly- Specified by:
replayOperationin classAttrHistorical- Parameters:
modsIterator- The iterator on the mods from which the mod is extracted.csn- The CSN associated to the operation.modifiedEntry- The entry modified by this operation.mod- The modification.- Returns:
trueif a conflict was detected,falseotherwise.
-
assign
public void assign(org.opends.server.replication.plugin.HistoricalAttributeValue histVal)
Description copied from class:AttrHistoricalAssign the provided historical value to this object.- Specified by:
assignin classAttrHistorical- Parameters:
histVal- the historical value
-
-