Interface IDerivedDataInfoRepository

All Known Implementing Classes:
BmDerivedDataInfoRepository

public interface IDerivedDataInfoRepository
Interface for component responsible for DerivedDataInfo persistence and management.
The implementation of this repository should return global modifiable instances of DerivedDataInfo for direct editing at the moment.
  • Field Details

  • Method Details

    • confirmSegmentComputation

      void confirmSegmentComputation(Object objectId, String segmentId)
      Confirms computation of DD segment for the given object.
      Parameters:
      objectId - The identifier of the corresponding BM object.
      segmentId - DD segment. Cannot be null.
    • getInfo

      DerivedDataInfo getInfo(Object objectId)
      Gets the registered DerivedDataInfo using the BM object identifier.
      Parameters:
      objectId - The identifier of the corresponding BM object.
      Returns:
      The instance of the DerivedDataInfo holding the data for the given identifier. null in case if there is no info registered for the given object identifier.
    • getOrCreateInfo

      DerivedDataInfo getOrCreateInfo(Object objectId)
      Gets the registered DerivedDataInfo using the BM object identifier. Creates a new instance in case if there is no info registered for the given object identifier.
      Parameters:
      objectId - The identifier of the corresponding BM object.
      Returns:
      The instance of the DerivedDataInfo holding the data for the given identifier, never null.
    • getAllInfos

      Iterable<DerivedDataInfo> getAllInfos()
      Gets all registered info records from the repository
      Returns:
      An iterable with all remaining records. May not be null
    • markAsBroken

      void markAsBroken(Object objectId)
      Marks the corresponding DerivedDataInfo as broken. Works only in case if the info is registered in the repository. Does nothing in case if no info is registered for the given object identifier.
      Parameters:
      objectId - The identifier of the corresponding BM object.
    • remove

      void remove(DerivedDataInfo info)
      Removes descriptor from the store.
      Parameters:
      info - The info to remove.
    • save

      void save(DerivedDataInfo info)
      Saves the descriptor of DS for a specific object.
      Parameters:
      info - The descriptor to save.
    • start

      void start(boolean delete, IBmModel bmModel)
      Starts the repository as the part of DD startup cycle.
      Parameters:
      delete - The flag showing whether all the contents must be deleted.
      bmModel - Corresponding BM model reference. May not be null
    • stop

      void stop(boolean delete)
      Stops the repository as the part of DD shutdown cycle.
      Parameters:
      delete - The flag showing whether all the contents must be deleted.
    • updateDerivedDataInfo

      void updateDerivedDataInfo(IObjectDerivedDataContext context)
      Updates derived data info according to provided context
      Parameters:
      context - The provided context, may not be null
    • updateDerivedDataInfo

      void updateDerivedDataInfo(IObjectDerivedDataContext context, long timestamp)
      Updates derived data info according to provided context
      Parameters:
      context - The provided context, may not be null
      timestamp - The context creation timestamp
    • loadExistingContext

      IObjectDerivedDataContext loadExistingContext(Object objectId, String segmentId, DerivedDataInfo.SegmentContextData segmentData, IObjectContextFactory objectContextFactory)
      Loads an existing context with a data being stored in the repository
      Parameters:
      objectId - A target object identifier. May not be null
      segmentId - A target object identifier. May not be null
      segmentData - A custom data of a context. May not be null
      objectContextFactory - The object context creation factory. May not be null
      Returns:
      Loaded async. computation context. Can be null in case if context doesn't exist
    • deactivateContexts

      void deactivateContexts(String segmentId, IObjectContextFactory objectContextFactory)
      Perform mass deactivation of contexts
      Parameters:
      segmentId - Target segment of async. processing pipeline for the deactivation
      objectContextFactory - The object context creation factory. May not be null