Class OMRSCohortManager
java.lang.Object
org.odpi.openmetadata.repositoryservices.metadatahighway.OMRSCohortManager
The OMRSCohortManager manages the components that connect to a single open metadata repository cohort.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
A new server needs to register the metadataCollectionId for its metadata repository with the other servers in the open metadata repository.void
disconnect
(boolean unregister) Disconnect from the cohort - part of shutdown logic.void
disconnectFromCohort
(boolean unregister) Close the connection to the registry store.Return the name of the cohort.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.void
setSecurityVerifier
(OpenMetadataEventsSecurity securityVerifier) Set up a new security verifier (the metadata collection runs with a default verifier until this method is called).toString()
Standard toString method.
-
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.- Parameters:
cohortName
- name of the cohort. This is a local name used for messages.localMetadataCollectionId
- configured value for the local metadata collection idlocalMetadataCollectionName
- display name for the local metadata collectionlocalServerName
- 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 typesconnectionConsumer
- 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 keptcohortSingleTopicConnector
- Connector to the cohort's single OMRS TopiccohortSingleTopicConnection
- Connection to the cohort's single OMRS TopiccohortRegistrationTopicConnector
- Connector to the cohort's registration OMRS TopiccohortRegistrationTopicConnection
- Connection to the cohort's registration OMRS TopiccohortTypesTopicConnector
- Connector to the cohort's types OMRS TopiccohortTypesTopicConnection
- Connection to the cohort's types OMRS TopiccohortInstancesTopicConnector
- Connector to the cohort's instances OMRS TopiccohortInstancesTopicConnection
- Connection to the cohort's instances OMRS TopicinboundEventExchangeRule
- rule for processing inbound events.
-
setSecurityVerifier
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.- Parameters:
securityVerifier
- new security verifier
-
getCohortName
Return the name of the cohort.- Returns:
- 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.- Parameters:
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.- Parameters:
unregister
- flag indicating if the local repository should unregister from the cohort because it is not going ot connect again.
-
toString
Standard toString method.
-