public class OMRSCohortManager extends Object
The OMRSCohortManager manages the components that connect to a single open metadata repository cohort.
  • Method Details

    • initialize

      public void initialize(String cohortName, String localMetadataCollectionId, String localMetadataCollectionName, String localServerName, String localServerType, String localOrganizationName, OMRSLocalRepository localRepository, OMRSRepositoryContentManager localRepositoryContentManager, OMRSConnectionConsumer connectionConsumer, OMRSTopicConnector enterpriseTopicConnector, OMRSCohortRegistryStore cohortRegistryStore, Connection cohortSingleTopicConnection, OMRSTopicConnector cohortSingleTopicConnector, Connection cohortRegistrationTopicConnection, OMRSTopicConnector cohortRegistrationTopicConnector, Connection cohortTypesTopicConnection, OMRSTopicConnector cohortTypesTopicConnector, Connection cohortInstancesTopicConnection, OMRSTopicConnector cohortInstancesTopicConnector, OMRSRepositoryEventExchangeRule inboundEventExchangeRule)
      The constructor defines the minimum information necessary to connect to a cohort. If these values are not correctly configured, the constructor will throw an exception.
      cohortName - name of the cohort. This is a local name used for messages.
      localMetadataCollectionId - configured value for the local metadata collection id
      localMetadataCollectionName - display name for the local metadata collection
      localServerName - the name of the local server. It is a descriptive name for informational purposes.
      localServerType - the type of the local server. It is a descriptive name for informational purposes.
      localOrganizationName - the name of the organization that owns the local server/repository. It is a descriptive name for informational purposes.
      localRepository - link to the local repository may be null.
      localRepositoryContentManager - the content manager that stores information about the known types
      connectionConsumer - The connection consumer is a component interested in maintaining details of the connections to each of the members of the open metadata repository cohort. If it is null, the cohort registry does not publish connections for members of the open metadata repository cohort.
      enterpriseTopicConnector - Connector to the federated OMRS Topic.
      cohortRegistryStore - the cohort registry store where details of members of the cohort are kept
      cohortSingleTopicConnector - Connector to the cohort's single OMRS Topic
      cohortSingleTopicConnection - Connection to the cohort's single OMRS Topic
      cohortRegistrationTopicConnector - Connector to the cohort's registration OMRS Topic
      cohortRegistrationTopicConnection - Connection to the cohort's registration OMRS Topic
      cohortTypesTopicConnector - Connector to the cohort's types OMRS Topic
      cohortTypesTopicConnection - Connection to the cohort's types OMRS Topic
      cohortInstancesTopicConnector - Connector to the cohort's instances OMRS Topic
      cohortInstancesTopicConnection - Connection to the cohort's instances OMRS Topic
      inboundEventExchangeRule - rule for processing inbound events.
    • setSecurityVerifier

      public void setSecurityVerifier(OpenMetadataEventsSecurity securityVerifier)
      Set up a new security verifier (the metadata collection runs with a default verifier until this method is called). The security verifier provides authorization checks for access and maintenance changes to open metadata. Authorization checks are enabled through the OpenMetadataServerSecurityConnector.
      securityVerifier - new security verifier
    • getCohortName

      public String getCohortName()
      Return the name of the cohort.
      String name
    • connectToCohort

      public void connectToCohort()
      A new server needs to register the metadataCollectionId for its metadata repository with the other servers in the open metadata repository. It only needs to do this once and uses a timestamp to record that the registration event has been sent. If the server has already registered in the past, it sends a reregistration request.
    • disconnectFromCohort

      public void disconnectFromCohort(boolean unregister)
      Close the connection to the registry store.
      unregister - boolean flag indicating whether the disconnection also includes unregistration from the cohort. If it is set to true, the OMRS Cohort will inform the other members of the cohort that it is leaving and remove all information about the cohort from the cohort registry store.
    • disconnect

      public void disconnect(boolean unregister)
      Disconnect from the cohort - part of shutdown logic.
      unregister - flag indicating if the local repository should unregister from the cohort because it is not going ot connect again.
    • toString

      public String toString()
      Standard toString method.
      toString in class Object
      JSON style description of variables.