Interface OMRSCohortRegistryStore

  • All Known Implementing Classes:
    OMRSCohortRegistryStoreConnectorBase

    public interface OMRSCohortRegistryStore
    OMRSCohortRegistryStore is a connector to a repository that can store registration information for a cohort registry. Each cohort registry store serves a single repository. It supports:
    • One LocalRegistration that describes information about the local repository and its registration with the metadata repository cohort. Note: the local registration is null if there is no local repository.
    • None to many RemoteRegistrations. There is a RemoteRegistration for each of the other repositories registered in the metadata repository cohort.
    • Method Detail

      • saveLocalRegistration

        void saveLocalRegistration​(MemberRegistration localRegistration)
        Save the local registration to the cohort registry store. This provides details of the local repository's registration with the metadata repository cohort. Any previous local registration information is overwritten.
        Parameters:
        localRegistration - details of the local repository's registration with the metadata cohort.
      • retrieveLocalRegistration

        MemberRegistration retrieveLocalRegistration()
        Retrieve details of the local registration from the cohort registry store. A null may be returned if the local registration information has not been saved (typically because this is a new server instance).
        Returns:
        MemberRegistration object containing details for the local repository's registration with the metadata cohort
      • removeLocalRegistration

        void removeLocalRegistration()
        Remove details of the local registration from the cohort registry store. This is used when the local repository unregisters from the open metadata repository cohort.
      • saveRemoteRegistration

        void saveRemoteRegistration​(MemberRegistration remoteRegistration)
        Save details of a remote registration. This contains details of one of the other repositories in the metadata repository cohort. If a remote registration already exists, it is over-written.
        Parameters:
        remoteRegistration - details of a remote repository in the metadata repository cohort.
      • retrieveRemoteRegistrations

        java.util.List<MemberRegistration> retrieveRemoteRegistrations()
        Return a list of all the remote metadata repositories registered in the metadata repository cohort.
        Returns:
        List of member registrations for remote servers/repositories
      • retrieveRemoteRegistration

        MemberRegistration retrieveRemoteRegistration​(java.lang.String metadataCollectionId)
        Return the registration information for a specific metadata repository, identified by its repository's metadata collection id. If the metadata collection id is not recognized then null is returned.
        Parameters:
        metadataCollectionId - unique identifier for the repository's metadata collection.
        Returns:
        MemberRegistration object containing details of the remote metadata repository.
      • removeRemoteRegistration

        void removeRemoteRegistration​(java.lang.String metadataCollectionId)
        Remove details of the requested remote repository's registration from the store.
        Parameters:
        metadataCollectionId - unique identifier for the repository's metadata collection
      • clearAllRegistrations

        void clearAllRegistrations()
        Remove the local and remote registrations from the cohort registry store since the local server has unregistered from the cohort.
      • close

        void close()
        Flush all changes and close the registry store.