Class RelationshipsAccumulator
java.lang.Object
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.ExceptionAccumulatorBase
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.QueryAccumulatorBase
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.QueryInstanceAccumulatorBase
org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.RelationshipsAccumulator
- Direct Known Subclasses:
RelationshipHistoryAccumulator
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.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.QueryInstanceAccumulatorBase
locallyStoredInstancesGUIDs
Fields inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.QueryAccumulatorBase
localMetadataCollectionId, repositoryValidator
-
Constructor Summary
ConstructorsConstructorDescriptionRelationshipsAccumulator
(String localMetadataCollectionId, AuditLog auditLog, OMRSRepositoryValidator repositoryValidator) Construct a relationship accumulator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRelationships
(List<Relationship> relationships, String metadataCollectionId) Add a list of relationships to the accumulator.getResults
(EnterpriseOMRSRepositoryConnector repositoryConnector) Extract the results - this will a list of unique relationships selected from the instances supplied to this accumulator.Methods inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.QueryAccumulatorBase
areResultsComplete, captureException, captureException, captureException, captureException, captureException, captureException, captureException, captureException, captureException, captureException, captureException, captureGenericException, registerExecutor, resultsReturned
Methods inherited from class org.odpi.openmetadata.repositoryservices.enterprise.repositoryconnector.accumulators.ExceptionAccumulatorBase
throwCapturedClassificationErrorException, throwCapturedEntityNotDeletedException, throwCapturedEntityNotKnownException, throwCapturedEntityProxyOnlyException, throwCapturedFunctionNotSupportedException, throwCapturedGenericException, throwCapturedInvalidParameterException, throwCapturedInvalidTypeDefException, throwCapturedPagingErrorException, throwCapturedPropertyErrorException, throwCapturedRelationshipNotDeletedException, throwCapturedRelationshipNotKnownException, throwCapturedRepositoryErrorException, throwCapturedStatusNotSupportedException, throwCapturedTypeDefConflictException, throwCapturedTypeDefNotKnownException, throwCapturedTypeDefNotSupportedException, throwCapturedTypeErrorException, throwCapturedUserNotAuthorizedException
-
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 repositoryauditLog
- audit log provides destination for log messagesrepositoryValidator
- validator provides common validation routines
-
-
Method Details
-
addRelationships
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 relationshipsmetadataCollectionId
- source metadata collection
-
getResults
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
-