Class FileBasedRegistryStoreConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.repositoryservices.connectors.stores.cohortregistrystore.OMRSCohortRegistryStoreConnectorBase
org.odpi.openmetadata.adapters.repositoryservices.cohortregistrystore.file.FileBasedRegistryStoreConnector
- All Implemented Interfaces:
AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
,OMRSCohortRegistryStore
FileBasedRegistryStoreConnector uses JSON to store details of the membership of the open metadata repository
cohort on behalf of the OMRSCohortRegistry.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.cohortregistrystore.OMRSCohortRegistryStoreConnectorBase
auditLog
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Remove the local and remote registrations from the cohort registry store since the local server has unregistered from the cohort.void
close()
Flush all changes and close the registry store.void
Close the config filevoid
initialize
(String connectorInstanceId, ConnectionProperties connectionProperties) Initialize the connector.void
Remove details of the local registration from the cohort registry store.void
removeRemoteRegistration
(String metadataCollectionId) Remove details of the requested remote repository's registration from the store.Retrieve details of the local registration from the cohort registry store.retrieveRemoteRegistration
(String metadataCollectionId) Return the registration information for a specific metadata repository, identified by its metadataCollectionId.Return a list of all the remote metadata repositories registered in the metadata repository cohort.void
saveLocalRegistration
(MemberRegistration localRegistration) Save the local registration to the cohort registry store.void
saveRemoteRegistration
(MemberRegistration remoteRegistration) Save details of a remote registration.Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.cohortregistrystore.OMRSCohortRegistryStoreConnectorBase
getConnectorComponentDescription, setAuditLog
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, start, throwMissingConfigurationProperty, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toString
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
Constructor Details
-
FileBasedRegistryStoreConnector
public FileBasedRegistryStoreConnector()
-
-
Method Details
-
initialize
Initialize the connector.- Overrides:
initialize
in classConnectorBase
- Parameters:
connectorInstanceId
- - unique id for the connector instance - useful for messages etcconnectionProperties
- - POJO for the configuration used to create the connector.
-
saveLocalRegistration
Save the local registration to the cohort registry store. This provides details of the local repository's registration with the metadata repository cohort. Any previous local registration information is overwritten.- Parameters:
localRegistration
- - details of the local repository's registration with the metadata cohort.
-
retrieveLocalRegistration
Retrieve details of the local registration from the cohort registry store. A null may be returned if the local registration information has not been saved (typically because this is a new server instance).- Returns:
- MemberRegistration object containing details for the local repository's registration with the metadata cohort (may be null if no registration has taken place).
-
removeLocalRegistration
public void removeLocalRegistration()Remove details of the local registration from the cohort registry store. This is used when the local repository unregisters from the open metadata repository cohort. There is a side-effect that all the remote registrations are removed to since the local repository is no longer a member of this cohort. -
saveRemoteRegistration
Save details of a remote registration. This contains details of one of the other repositories in the metadata repository cohort.- Parameters:
remoteRegistration
- - details of a remote repository in the metadata repository cohort.
-
retrieveRemoteRegistrations
Return a list of all the remote metadata repositories registered in the metadata repository cohort.- Returns:
- Remote registrations list
-
retrieveRemoteRegistration
Return the registration information for a specific metadata repository, identified by its metadataCollectionId. If the metadataCollectionId is not recognized then null is returned.- Parameters:
metadataCollectionId
- - unique identifier for the repository- Returns:
- MemberRegistration object containing details of the remote metadata repository. (null if not found)
-
removeRemoteRegistration
Remove details of the requested remote repository's registration from the store.- Parameters:
metadataCollectionId
- - unique identifier for the repository
-
clearAllRegistrations
public void clearAllRegistrations()Remove the local and remote registrations from the cohort registry store since the local server has unregistered from the cohort. -
disconnect
public void disconnect()Close the config file- Overrides:
disconnect
in classConnectorBase
-
close
public void close()Flush all changes and close the registry store.
-