Class DerivedDataInfo

java.lang.Object
com._1c.g5.v8.internal.derived.DerivedDataInfo

public class DerivedDataInfo extends Object
In-memory descriptor of the derived data associated with the object.
  • Constructor Details

    • DerivedDataInfo

      public DerivedDataInfo(Object objectId)
      Constructs an instance
      Parameters:
      objectId - The object identifier. May not be null
  • Method Details

    • addSegmentContextData

      public void addSegmentContextData(String segmentId, long timestamp, byte[] serializedContext)
      Adds a context data for a given segment of a data info
      Parameters:
      segmentId - The identifier of a segment. May not be null
      timestamp - The timestamp of a data. May not be 0 or negative
      serializedContext - The serialized context data. May not be null
    • confirmComputedSegment

      public void confirmComputedSegment(String segmentId)
      Confirms a segment computation
      Parameters:
      segmentId - The segment to confirm. May not be null
    • getNotComputedSegmentIds

      public Collection<String> getNotComputedSegmentIds()
      Gets identifiers of DD segments which being registered for this object and not yet computed.
      Returns:
      The collection of not computed DD segment identifiers.
    • getObjectId

      public Object getObjectId()
      Gets an object identifier
      Returns:
      The identifier of matching object. May not be null
    • getSegmentContextData

      public DerivedDataInfo.SegmentContextData getSegmentContextData(String segmentId)
      Gets segment context data, if any
      Parameters:
      segmentId - The identifier of a segment. May not be null
      Returns:
      The segment context data if any. May be null
    • getSegments

      Gets segments of this info
      Returns:
      The map of segment data being mapped to identifiers of segments. May not be null
    • isAllComputed

      public boolean isAllComputed()
      Checks if all DD segments of the object are computed.
      Returns:
      True if all DD segments are computed; false otherwise.
    • isBroken

      public boolean isBroken()
      Checks if the data wasn't computed and must be re-build in case of data change and/or restart
      Returns:
      True if the data is broken
    • isComputed

      public boolean isComputed(Collection<String> segmentIds)
      Checks if given segments are computed
      Parameters:
      segmentIds - Identifiers of target segments. May not be null
      Returns:
      True if all provided segments are computed
    • isComputed

      public boolean isComputed(String segmentd)
      Checks if a given DD segment is computed a given object.
      Parameters:
      segmentd - The segment identifier. May not be null
      Returns:
      True if the segment is computed
    • markAsBroken

      public void markAsBroken()
      Marks this derived data info as broken
    • markAsNotBroken

      public void markAsNotBroken()
      Marks this derived data info as not broken
    • toString

      public String toString()
      Overrides:
      toString in class Object