public class RelationshipsAccumulator extends QueryInstanceAccumulatorBase
RelationshipsAccumulator accumulates and validates relationships received from a collection of open metadata repositories. It removes duplicates from the list by choosing the latest version. This class may be called simultaneously from different threads so it must be thread-safe.
  • Constructor Details

    • RelationshipsAccumulator

      public RelationshipsAccumulator(String localMetadataCollectionId, AuditLog auditLog, OMRSRepositoryValidator repositoryValidator)
      Construct a relationship accumulator. Its base class manages the common variables needed to control the execution of requests across all members of the cohort(s).
      Parameters:
      localMetadataCollectionId - collection id of local repository - null means no local repository
      auditLog - audit log provides destination for log messages
      repositoryValidator - validator provides common validation routines
  • Method Details

    • addRelationships

      public void addRelationships(List<Relationship> relationships, String metadataCollectionId)
      Add a list of relationships to the accumulator. This method is included to save the executors from coding this loop to process each instance.
      Parameters:
      relationships - list of retrieved relationships
      metadataCollectionId - source metadata collection
    • getResults

      public List<Relationship> getResults(EnterpriseOMRSRepositoryConnector repositoryConnector)
      Extract the results - this will a list of unique relationships selected from the instances supplied to this accumulator. It should be called once all the executors have completed processing their request(s).
      Parameters:
      repositoryConnector - enterprise connector
      Returns:
      list of relationships