Class OMRSRepositoryEventExchangeRule
java.lang.Object
org.odpi.openmetadata.repositoryservices.eventmanagement.OMRSRepositoryEventExchangeRule
OMRSRepositoryEventExchangeRule determines if particular types of events should be exchanged on the OMRS Topic.
-
Constructor Summary
ConstructorDescriptionOMRSRepositoryEventExchangeRule
(OpenMetadataExchangeRule exchangeRule, List<TypeDefSummary> selectedTypesToProcess) Constructor provides all the objects used in the event exchange decision. -
Method Summary
Modifier and TypeMethodDescriptionboolean
learnInstanceEvent
(InstanceHeader instance) If the rule is in learning mode, determine if the type of the instance should be added to the list of types being processed.boolean
processInstanceEvent
(String typeDefGUID, String typeDefName) Determine from the type of the instance if an instance event should be processed.boolean
processInstanceEvent
(InstanceHeader instance) Determine from the type of the instance if an instance event should be processed.boolean
processInstanceEvent
(TypeDefSummary typeDefSummary) Determine from the type of the instance if an instance event should be processed.boolean
Determine if TypeDef events should be processed.
-
Constructor Details
-
OMRSRepositoryEventExchangeRule
public OMRSRepositoryEventExchangeRule(OpenMetadataExchangeRule exchangeRule, List<TypeDefSummary> selectedTypesToProcess) Constructor provides all the objects used in the event exchange decision.- Parameters:
exchangeRule
- enum detailing the types of events to process.selectedTypesToProcess
- supplementary list to support selective processing of events.
-
-
Method Details
-
processTypeDefEvents
public boolean processTypeDefEvents()Determine if TypeDef events should be processed. TypeDef events are processed unless the rule is set to registration events only.- Returns:
- boolean flag indicating if the event should be processed.
-
processInstanceEvent
Determine from the type of the instance if an instance event should be processed.- Parameters:
typeDefGUID
- unique identifier of the typetypeDefName
- unique name of the type- Returns:
- boolean flag
-
processInstanceEvent
Determine from the type of the instance if an instance event should be processed.- Parameters:
typeDefSummary
- details of the type- Returns:
- boolean flag
-
processInstanceEvent
Determine from the type of the instance if an instance event should be processed.- Parameters:
instance
- details of the instance to test- Returns:
- boolean flag
-
learnInstanceEvent
If the rule is in learning mode, determine if the type of the instance should be added to the list of types being processed. For this to happen, the instance header must include a valid type, the type must be an active type for this server and not already included in the list. Any errors discovered in the types, of this rule's set up result in a false result. No diagnostics are created because this method is called very frequently and the errors will be trapped and logged elsewhere.- Parameters:
instance
- details of the instance to test- Returns:
- boolean flag true if the instance should be saved as a learned instance.
-