Class GovernanceEngineMap
java.lang.Object
org.odpi.openmetadata.governanceservers.enginehostservices.enginemap.GovernanceEngineMap
GovernanceEngineMap provides a thread safe mapping of governance engine names to governance engine handlers.
This class allows the governance engine handler to be added after the engine host has started processing requests.
It is not possible to create the governance handler until the governance engine definition has been retrieved from
the metadata access server. So, unless the engine definition is linked explicitly to an engine service,
the type of the governance engine handler is unknown. Retrieval of a governance engine definition may be
triggered by an event, or by a refresh sweep of the metadata. Therefore, it is possible that two threads
are responding to the creation of a new governance engine definition. Hence, the synchronized methods
-
Constructor Summary
ConstructorDescriptionGovernanceEngineMap
(String localServerName, String localServerUserId, String localServerPassword, GovernanceConfigurationClient configurationClient, GovernanceContextClient engineActionClient, AuditLog auditLog, int maxPageSize) Create a client-side object for calling a survey action engine. -
Method Summary
Modifier and TypeMethodDescriptiongetGovernanceEngineHandler
(String governanceEngineName) Return the governance engine handler for a specific governance engine name if known.getGovernanceEngineHandler
(String governanceEngineGUID, String governanceEngineName) Retrieve, or create the governance handler for a governance engine.Return the list of active governance engine handlers.Return the list of the configured engines.getGovernanceEngineNames
(String serviceURLMarker) Return the list of the configured engines for a particular engine service.void
setGovernanceEngineProperties
(List<EngineConfig> engineConfigs, String partnerServerName, String partnerURLRoot) Set up a placeholder entry in the governance handler map for a governance engine.void
setGovernanceEngineProperties
(EngineConfig engineConfig, String partnerServerName, String partnerURLRoot) Set up a placeholder entry in the governance handler map for a governance engine.
-
Constructor Details
-
GovernanceEngineMap
public GovernanceEngineMap(String localServerName, String localServerUserId, String localServerPassword, GovernanceConfigurationClient configurationClient, GovernanceContextClient engineActionClient, AuditLog auditLog, int maxPageSize) Create a client-side object for calling a survey action engine.- Parameters:
localServerName
- the name of the engine host server where the survey action engine is runninglocalServerUserId
- user id for the engine host server to uselocalServerPassword
- optional password for the engine host server to useconfigurationClient
- client to retrieve the configurationengineActionClient
- client used by the engine host services to control the execution of engine action requestsauditLog
- logging destinationmaxPageSize
- maximum number of results that can be returned in a single request
-
-
Method Details
-
getGovernanceEngineHandler
public GovernanceEngineHandler getGovernanceEngineHandler(String governanceEngineGUID, String governanceEngineName) Retrieve, or create the governance handler for a governance engine.- Parameters:
governanceEngineGUID
- unique identifier of the governance engine definition in open metadatagovernanceEngineName
- unique name of the governance engine definition in open metadata- Returns:
- governance engine handler
-
getGovernanceEngineHandler
Return the governance engine handler for a specific governance engine name if known. If the handler does not yet exist, null is returned- Parameters:
governanceEngineName
- name to lookup- Returns:
- handler or null
-
getGovernanceEngineHandlers
Return the list of active governance engine handlers.- Returns:
- list of governance engine handlers or an empty list
-
getGovernanceEngineNames
Return the list of the configured engines.- Returns:
- list of engine names
-
getGovernanceEngineNames
Return the list of the configured engines for a particular engine service.- Parameters:
serviceURLMarker
- marker that determines which engine service is calling.- Returns:
- list of engine names
-
setGovernanceEngineProperties
public void setGovernanceEngineProperties(List<EngineConfig> engineConfigs, String partnerServerName, String partnerURLRoot) Set up a placeholder entry in the governance handler map for a governance engine.- Parameters:
engineConfigs
- list of engine descriptionspartnerServerName
- name of the server where the engine definition is locatedpartnerURLRoot
- url of the platform where the server is located
-
setGovernanceEngineProperties
public void setGovernanceEngineProperties(EngineConfig engineConfig, String partnerServerName, String partnerURLRoot) Set up a placeholder entry in the governance handler map for a governance engine.- Parameters:
engineConfig
- description of the enginepartnerServerName
- name of the server where the engine definition is locatedpartnerURLRoot
- url of the platform where the server is located
-