Class OMRSMetadataHighwayManager
java.lang.Object
org.odpi.openmetadata.repositoryservices.metadatahighway.OMRSMetadataHighwayManager
OMRSMetadataHighwayManager is responsible for managing the connectivity to each cohort that the local
server is a member of.
-
Constructor Summary
ConstructorDescriptionOMRSMetadataHighwayManager
(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. -
Method Summary
Modifier and TypeMethodDescriptionboolean
connectToCohort
(String cohortName) A new server needs to register the metadataCollectionId for its metadata repository with the other servers in the open metadata repository.connectToCohort
(CohortConfig cohortConfig) Initialize the components to connect the local repository to a cohort.void
disconnect
(boolean permanent) Disconnect from all cohorts - part of server shutdown.boolean
disconnectFromCohort
(String cohortName, boolean unregister) Disconnect communications from a specific cohort.getCohortConnectionStatus
(String cohortName) Return the status of the named cohort.Return the list of cohortsReturn the common values used by this server to register with a cohort.getLocalRegistration
(String cohortName) Return the common values used by this server to register with a cohort.getRemoteMembers
(String cohortName) Return the remote member of a specific cohortvoid
initialize
(List<CohortConfig> cohortConfigList) Initialize each cohort manager in turn.void
setSecurityVerifier
(OpenMetadataEventsSecurity securityVerifier) Set up a new security verifier (the cohort manager runs with a default verifier until this method is called).toString()
Standard toString method.
-
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
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
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
Initialize the components to connect the local repository to a cohort.- Parameters:
cohortConfig
- description of cohort.- Returns:
- the status of the cohort
-
getLocalRegistration
Return the common values used by this server to register with a cohort.- Returns:
- local registration
-
getLocalRegistration
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
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
Return the remote member of a specific cohort- Parameters:
cohortName
- name of cohort- Returns:
- list of members
-
getCohortDescriptions
Return the list of cohorts- Returns:
- cohort descriptions
-
getCohortConnectionStatus
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
Disconnect communications from a specific cohort.- Parameters:
cohortName
- name of cohortunregister
- 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
Standard toString method.
-