Class OMRSMetadataHighwayManager

java.lang.Object
org.odpi.openmetadata.repositoryservices.metadatahighway.OMRSMetadataHighwayManager

public class OMRSMetadataHighwayManager extends Object
OMRSMetadataHighwayManager is responsible for managing the connectivity to each cohort that the local server is a member of.
  • Constructor Details

    • OMRSMetadataHighwayManager

      public OMRSMetadataHighwayManager(String localServerName, String localServerType, String localOrganizationName, OMRSLocalRepository localRepository, OMRSRepositoryContentManager localRepositoryContentManager, OMRSConnectionConsumer enterpriseAccessConnectionConsumer, OMRSTopicConnector enterpriseAccessTopicConnector, AuditLog auditLog)
      Constructor taking the values that are used in every cohort. Any of these values may be null.
      Parameters:
      localServerName - name of the local server.
      localServerType - descriptive type of the local server.
      localOrganizationName - name of the organization that owns the local server.
      localRepository - link to local repository may be null.
      localRepositoryContentManager - repository content manager associated with this server's operation and used in evaluating the type definitions (TypeDefs) passed around the cohort.
      enterpriseAccessConnectionConsumer - connection consumer for managing the connections of enterprise access.
      enterpriseAccessTopicConnector - connector for the OMRS Topic for enterprise access.
      auditLog - audit log for this component.
  • Method Details

    • initialize

      public void initialize(List<CohortConfig> cohortConfigList)
      Initialize each cohort manager in turn. Configuration errors will result in an exception and the initialization process will halt.
      Parameters:
      cohortConfigList - list of cohorts to initialize
    • setSecurityVerifier

      public void setSecurityVerifier(OpenMetadataEventsSecurity securityVerifier)
      Set up a new security verifier (the cohort manager 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.
      Parameters:
      securityVerifier - new security verifier
    • connectToCohort

      public CohortConnectionStatus connectToCohort(CohortConfig cohortConfig)
      Initialize the components to connect the local repository to a cohort.
      Parameters:
      cohortConfig - description of cohort.
      Returns:
      the status of the cohort
    • getLocalRegistration

      public MemberRegistration getLocalRegistration()
      Return the common values used by this server to register with a cohort.
      Returns:
      local registration
    • getLocalRegistration

      public MemberRegistration getLocalRegistration(String cohortName)
      Return the common values used by this server to register with a cohort.
      Parameters:
      cohortName - name of the cohort to extract the registration time from.
      Returns:
      local registration
    • connectToCohort

      public boolean connectToCohort(String cohortName)
      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.
      Parameters:
      cohortName - name of cohort
      Returns:
      flag indicating that the cohort name was recognized
    • getRemoteMembers

      public List<MemberRegistration> getRemoteMembers(String cohortName)
      Return the remote member of a specific cohort
      Parameters:
      cohortName - name of cohort
      Returns:
      list of members
    • getCohortDescriptions

      public List<CohortDescription> getCohortDescriptions()
      Return the list of cohorts
      Returns:
      cohort descriptions
    • getCohortConnectionStatus

      public CohortConnectionStatus getCohortConnectionStatus(String cohortName)
      Return the status of the named cohort.
      Parameters:
      cohortName - name of cohort
      Returns:
      connection status if the cohort manager is not running then "NOT_INITIALIZED" is returned
    • disconnectFromCohort

      public boolean disconnectFromCohort(String cohortName, boolean unregister)
      Disconnect communications from a specific cohort.
      Parameters:
      cohortName - name of cohort
      unregister - is the local server permanently disconnecting from the cohort causes an unregistration event to be sent to the other members.
      Returns:
      boolean flag to indicate success.
    • disconnect

      public void disconnect(boolean permanent)
      Disconnect from all cohorts - part of server shutdown.
      Parameters:
      permanent - indicates whether the cohort registry should unregister from the cohort and clear its registry store or just disconnect from the event topic.
    • toString

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