Class AttrHistoricalSingle

java.lang.Object
org.opends.server.replication.plugin.AttrHistorical
org.opends.server.replication.plugin.AttrHistoricalSingle

public final class AttrHistoricalSingle extends AttrHistorical
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 Details

    • AttrHistoricalSingle

      public AttrHistoricalSingle()
  • Method Details

    • getDeleteTime

      public Csn getDeleteTime()
      Description copied from class: AttrHistorical
      Returns the last time when this attribute was deleted.
      Specified by:
      getDeleteTime in class AttrHistorical
      Returns:
      the last time when this attribute was deleted
    • getValuesHistorical

      public Set<AttrValueHistorical> getValuesHistorical()
      Description copied from class: AttrHistorical
      Returns the unmodifiable historical values.
      Specified by:
      getValuesHistorical in class AttrHistorical
      Returns:
      the unmodifiable historical values
    • containsAddedValue

      public boolean containsAddedValue(ByteString value)
      Description copied from class: AttrHistorical
      Returns true if this historical information contains add or replace meta-data for the provided attribute value.
      Specified by:
      containsAddedValue in class AttrHistorical
      Parameters:
      value - The attribute value.
      Returns:
      true if this historical information contains add or replace meta-data for the provided attribute value.
    • processLocalOrNonConflictModification

      public void processLocalOrNonConflictModification(Csn csn, Modification mod)
      Description copied from class: AttrHistorical
      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.

      Specified by:
      processLocalOrNonConflictModification in class AttrHistorical
      Parameters:
      csn - The CSN of the operation to process
      mod - The modify operation to process.
    • replayOperation

      public Modification replayOperation(Csn csn, Entry modifiedEntry, Modification mod)
      Description copied from class: AttrHistorical
      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.
      Specified by:
      replayOperation in class AttrHistorical
      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 null if the modification should not be replayed.
    • attributeDeleteTime

      public void attributeDeleteTime(Csn csn)
      Description copied from class: AttrHistorical
      Sets the attribute delete time.
      Specified by:
      attributeDeleteTime in class AttrHistorical
      Parameters:
      csn - the attribute delete time
    • assignPreDeduplicatedValues

      public void assignPreDeduplicatedValues(List<HistoricalAttributeValue> histVals)
      Description copied from class: AttrHistorical
      Assigns all the pre-deduplicated historical values to this attribute.
      Specified by:
      assignPreDeduplicatedValues in class AttrHistorical
      Parameters:
      histVals - the pre-deduplicated historical values
    • assign

      public void assign(List<HistoricalAttributeValue> histVals)
      Description copied from class: AttrHistorical
      Assigns all the historical values to this attribute.
      Specified by:
      assign in class AttrHistorical
      Parameters:
      histVals - the historical values
    • toString

      public String toString()
      Overrides:
      toString in class Object