java.lang.Object
org.odpi.openmetadata.adminservices.configuration.properties.AdminServicesConfigHeader
org.odpi.openmetadata.adminservices.configuration.properties.CohortConfig

public class CohortConfig extends AdminServicesConfigHeader
CohortConfig provides the configuration properties used to connect to an open metadata repository cohort.
  • cohortName is a descriptive name for the cohort that is used primarily for messages and diagnostics. It is also used to create a default name for the cohort's OMRS Topic and the cohortRegistry's store if these names are not explicitly defined.
  • cohortRegistryConnection is the connection properties necessary to create the connector to the cohort registry store. This is the store where the cohort registry keeps information about its local metadata collection identifier and details of other repositories in the cohort. The default value is to use a local file called "cohort.registry" that is stored in the server's home directory.
  • cohortOMRSTopicConnection is the connection properties necessary to create the connector to the OMRS Topic. This is used to send/receive events between members of the open metadata repository cohort.
  • cohortOMRSTopicProtocolVersion defines the version of the event payload to use when communicating with other members of the cohort through the OMRS Topic.
  • eventsToProcessRule defines how incoming events on the OMRS Topic should be processed.
  • selectedTypesToProcess - list of TypeDefs used if the eventsToProcess rule (above) says "SELECTED_TYPES" - otherwise it is set to null.
  • Constructor Details

    • CohortConfig

      public CohortConfig()
      Default constructor does nothing.
    • CohortConfig

      public CohortConfig(CohortConfig template)
      Copy/clone constructor
      Parameters:
      template - object to copy
  • Method Details

    • getCohortName

      public String getCohortName()
      Return the name of the cohort.
      Returns:
      String name
    • setCohortName

      public void setCohortName(String cohortName)
      Set up the name of the cohort.
      Parameters:
      cohortName - String
    • getCohortRegistryConnection

      public Connection getCohortRegistryConnection()
      Set up the connection to the cohort registry store.
      Returns:
      Connection object
    • setCohortRegistryConnection

      public void setCohortRegistryConnection(Connection cohortRegistryConnection)
      Set up the connection for the cohort registry store.
      Parameters:
      cohortRegistryConnection - Connection object
    • getCohortOMRSTopicConnection

      public Connection getCohortOMRSTopicConnection()
      Return the connection to the cohort's single OMRS Topic. This topic is used for exchanging metadata with back-level servers. It should be removed if all members of the cohort are able to use the three split cohort topics since it is much more efficient.
      Returns:
      Connection object
    • setCohortOMRSTopicConnection

      public void setCohortOMRSTopicConnection(Connection cohortOMRSTopicConnection)
      Set up the connection to the cohort's single OMRS Topic. This topic is used for exchanging metadata with back-level servers. It should be removed if all members of the cohort are able to use the three split cohort topics since it is much more efficient.
      Parameters:
      cohortOMRSTopicConnection - Connection object
    • getCohortOMRSRegistrationTopicConnection

      public Connection getCohortOMRSRegistrationTopicConnection()
      Return the connection to the topic that is dedicated to the registration requests that manage the membership of the cohort.
      Returns:
      Connection object
    • setCohortOMRSRegistrationTopicConnection

      public void setCohortOMRSRegistrationTopicConnection(Connection cohortOMRSRegistrationTopicConnection)
      Set up the connection to the topic that is dedicated to the registration requests that manage the membership of the cohort.
      Parameters:
      cohortOMRSRegistrationTopicConnection - Connection object
    • getCohortOMRSTypesTopicConnection

      public Connection getCohortOMRSTypesTopicConnection()
      Return the connection to the topic that is dedicated to the type validation requests that manage the consistency of types within the cohort.
      Returns:
      Connection object
    • setCohortOMRSTypesTopicConnection

      public void setCohortOMRSTypesTopicConnection(Connection cohortOMRSTypesTopicConnection)
      Set up the connection to the topic that is dedicated to the type validation requests that manage the consistency of types within the cohort.
      Parameters:
      cohortOMRSTypesTopicConnection - Connection object
    • getCohortOMRSInstancesTopicConnection

      public Connection getCohortOMRSInstancesTopicConnection()
      Return the connection to the topic that is dedicated to exchanging details of the metadata instances stored by the members of the cohort.
      Returns:
      Connection object
    • setCohortOMRSInstancesTopicConnection

      public void setCohortOMRSInstancesTopicConnection(Connection cohortOMRSInstancesTopicConnection)
      Set up the connection to the topic that is dedicated to exchanging details of the metadata instances stored by the members of the cohort.
      Parameters:
      cohortOMRSInstancesTopicConnection - Connection object
    • getCohortOMRSTopicProtocolVersion

      public OpenMetadataEventProtocolVersion getCohortOMRSTopicProtocolVersion()
      Return the protocol version to use when exchanging events amongst the cohort members.
      Returns:
      protocol version enum
    • setCohortOMRSTopicProtocolVersion

      public void setCohortOMRSTopicProtocolVersion(OpenMetadataEventProtocolVersion cohortOMRSTopicProtocolVersion)
      Set up the protocol version to use when exchanging events amongst the cohort members.
      Parameters:
      cohortOMRSTopicProtocolVersion - protocol version enum
    • getEventsToProcessRule

      public OpenMetadataExchangeRule getEventsToProcessRule()
      Return the rule indicating whether incoming metadata events from a cohort should be processed.
      Returns:
      OpenMetadataExchangeRule - NONE, JUST_TYPEDEFS, SELECTED_TYPES and ALL.
    • setEventsToProcessRule

      public void setEventsToProcessRule(OpenMetadataExchangeRule eventsToProcessRule)
      Set up the rule indicating whether incoming metadata events from a cohort should be processed.
      Parameters:
      eventsToProcessRule - OpenMetadataExchangeRule - NONE, JUST_TYPEDEFS, SELECTED_TYPES and ALL.
    • getSelectedTypesToProcess

      public List<TypeDefSummary> getSelectedTypesToProcess()
      Return the list of TypeDefs used if the eventsToProcess rule (above) says "SELECTED_TYPES" - otherwise it is set to null.
      Returns:
      list of TypeDefs that determine which metadata instances to process
    • setSelectedTypesToProcess

      public void setSelectedTypesToProcess(List<TypeDefSummary> selectedTypesToProcess)
      Set up the list of TypeDefs used if the EventsToProcess rule (above) says "SELECTED_TYPES" - otherwise it is set to null.
      Parameters:
      selectedTypesToProcess - list of TypeDefs that determine which metadata instances to process
    • toString

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

      public boolean equals(Object objectToCompare)
      Validate that an object is equal depending on their stored values.
      Overrides:
      equals in class Object
      Parameters:
      objectToCompare - object
      Returns:
      boolean result
    • hashCode

      public int hashCode()
      Return a hash code based on the values of this object.
      Overrides:
      hashCode in class Object
      Returns:
      in hash code