Class AttrHistorical
- java.lang.Object
-
- org.opends.server.replication.plugin.AttrHistorical
-
- Direct Known Subclasses:
AttrHistoricalMultiple,AttrHistoricalSingle
public abstract class AttrHistorical extends Object
This class store historical information for a provided attribute.
-
-
Constructor Summary
Constructors Constructor Description AttrHistorical()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidassign(org.opends.server.replication.plugin.HistoricalAttributeValue histVal)Assign the provided historical value to this object.static AttrHistoricalcreateAttributeHistorical(AttributeType attrType)Create a new object from a provided attribute type.abstract CSNgetDeleteTime()Returns the last time when this attribute was deleted.abstract Set<AttrValueHistorical>getValuesHistorical()Get the historical informations for this attribute Info.abstract 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.abstract booleanreplayOperation(Iterator<Modification> modsIterator, CSN csn, Entry modifiedEntry, Modification mod)This method will be called when replaying an operation.
-
-
-
Method Detail
-
replayOperation
public abstract boolean replayOperation(Iterator<Modification> modsIterator, CSN csn, Entry modifiedEntry, Modification mod)
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 modify the mod and the mods iterator accordingly- 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.
-
processLocalOrNonConflictModification
public abstract void processLocalOrNonConflictModification(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. 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.
-
createAttributeHistorical
public static AttrHistorical createAttributeHistorical(AttributeType attrType)
Create a new object from a provided attribute type. Historical is empty.- Parameters:
attrType- the provided attribute type.- Returns:
- a new AttributeInfo object.
-
getValuesHistorical
public abstract Set<AttrValueHistorical> getValuesHistorical()
Get the historical informations for this attribute Info.- Returns:
- the historical informations
-
getDeleteTime
public abstract CSN getDeleteTime()
Returns the last time when this attribute was deleted.- Returns:
- the last time when this attribute was deleted
-
assign
public abstract void assign(org.opends.server.replication.plugin.HistoricalAttributeValue histVal)
Assign the provided historical value to this object.- Parameters:
histVal- the historical value
-
-