Class XTDBOMRSRepositoryConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.XTDBOMRSRepositoryConnector
- All Implemented Interfaces:
org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent,org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension,org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSMetadataCollectionManager
public class XTDBOMRSRepositoryConnector
extends org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector
Provides all connectivity and API-based interaction with a XTDB back-end.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor used by the OCF Connector Provider. -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanDefault equality comparison.booleanIndicates whether the connector expects all regular expressions to be Lucene-compatible (true) or not (false).org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailgetResultingEntity(String docId, xtdb.api.TransactionInstant instant, String methodName) Validates that the commit was persisted (if synchronous), throwing an exception if it failed, and also retrieves and returns the detailed entity that resulted from the transaction.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntitySummarygetResultingEntitySummary(String docId, xtdb.api.TransactionInstant instant, String methodName) Validates that the commit was persisted (if synchronous), throwing an exception if it failed, and also retrieves and returns the summary entity that resulted from the transaction.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.RelationshipgetResultingRelationship(String docId, xtdb.api.TransactionInstant instant, String methodName) Validates that the commit was persisted (if synchornous), throwing an exception if it failed, and also retrieves and returns the detailed relationship that resulted from the transaction.xtdb.api.IXtdbRetrieve the XTDB API directly.inthashCode()Default hash calculation.booleanChecks whether the data store is currently empty.booleanIndicates whether Lucene is configured in the connector (true) or not (false).voidlogProblem(String className, String methodName, XTDBAuditCode code, Throwable cause, String... params) Log a problem with the connector, preferring the audit log so long as it is available and only falling back to debug-level logging if it is not.xtdb.api.TransactionInstantrunTx(xtdb.api.tx.Transaction statements) Run multiple statements through XTDB as a single transaction.voidsetMetadataCollectionId(String metadataCollectionId) voidstart()voidvalidateCommit(xtdb.api.TransactionInstant instant, String methodName) Validate that the commit was persisted, or throw an exception if it failed.Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector
getConnectorComponentDescription, getMaxPageSize, getMetadataCollection, getMetadataCollectionId, getMetadataCollectionName, getOrganizationName, getRepositoryHelper, getRepositoryName, getRepositoryValidator, getServerName, getServerType, getServerUserId, setAuditLog, setMaxPageSize, setMetadataCollectionName, setOrganizationName, setRepositoryHelper, setRepositoryName, setRepositoryValidator, setServerName, setServerType, setServerUserId, validateRepositoryIsActiveMethods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
getConnectedAssetProperties, getConnection, getConnectorInstanceId, initialize, initializeConnectedAssetProperties, initializeSecretsStoreConnector, isActive, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
Constructor Details
-
XTDBOMRSRepositoryConnector
public XTDBOMRSRepositoryConnector()Default constructor used by the OCF Connector Provider.
-
-
Method Details
-
setMetadataCollectionId
- Specified by:
setMetadataCollectionIdin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSMetadataCollectionManager- Overrides:
setMetadataCollectionIdin classorg.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector
-
start
public void start() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- Overrides:
startin classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
-
disconnect
public void disconnect() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- Overrides:
disconnectin classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
-
isLuceneConfigured
public boolean isLuceneConfigured()Indicates whether Lucene is configured in the connector (true) or not (false).- Returns:
- boolean
-
expectsLuceneRegexes
public boolean expectsLuceneRegexes()Indicates whether the connector expects all regular expressions to be Lucene-compatible (true) or not (false).- Returns:
- boolean
-
logProblem
public void logProblem(String className, String methodName, XTDBAuditCode code, Throwable cause, String... params) Log a problem with the connector, preferring the audit log so long as it is available and only falling back to debug-level logging if it is not.- Parameters:
className- where the problem occurredmethodName- where the problem occurredcode- describing the problemcause- the exception that triggered the problem (if any)params- providing additional details about the problem
-
isDataStoreEmpty
public boolean isDataStoreEmpty()Checks whether the data store is currently empty.- Returns:
- true of the data store is empty (has no metadata stored), otherwise false
-
validateCommit
Validate that the commit was persisted, or throw an exception if it failed.- Parameters:
instant- giving the commit pointmethodName- that made the commit- Throws:
Exception- on any error
-
getResultingEntity
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getResultingEntity(String docId, xtdb.api.TransactionInstant instant, String methodName) throws Exception Validates that the commit was persisted (if synchronous), throwing an exception if it failed, and also retrieves and returns the detailed entity that resulted from the transaction. Note that if the operation is configured to be asynchronous, this will ALWAYS return null for the entity details.- Parameters:
docId- of the entity within XTDB itself (i.e. prefixed)instant- giving the commit point of the transactionmethodName- that made the commit- Returns:
- EntityDetail result of the committed transaction (synchronous) or null (asynchronous)
- Throws:
Exception- on any error
-
getResultingEntitySummary
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntitySummary getResultingEntitySummary(String docId, xtdb.api.TransactionInstant instant, String methodName) throws Exception Validates that the commit was persisted (if synchronous), throwing an exception if it failed, and also retrieves and returns the summary entity that resulted from the transaction. Note that if the operation is configured to be asynchronous, this will ALWAYS return null for the entity details.- Parameters:
docId- of the entity within XTDB itself (i.e. prefixed)instant- giving the commit point of the transactionmethodName- that made the commit- Returns:
- EntitySummary result of the committed transaction (synchronous) or null (asynchronous)
- Throws:
Exception- on any error
-
getResultingRelationship
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getResultingRelationship(String docId, xtdb.api.TransactionInstant instant, String methodName) throws Exception Validates that the commit was persisted (if synchornous), throwing an exception if it failed, and also retrieves and returns the detailed relationship that resulted from the transaction. Note that if the operation is configured to be asynchronous, this will ALWAYS return null for the relationship detials.- Parameters:
docId- of the relationship within XTDB itself (i.e. prefixed)instant- giving the commit point of the transactionmethodName- that made the commit- Returns:
- Relationship result of the committed transaction (synchronous) or null (asynchronous)
- Throws:
Exception- on any error
-
runTx
public xtdb.api.TransactionInstant runTx(xtdb.api.tx.Transaction statements) Run multiple statements through XTDB as a single transaction.- Parameters:
statements- the transaction to submit- Returns:
- TransactionInstant transaction details
-
getXtdbAPI
public xtdb.api.IXtdb getXtdbAPI()Retrieve the XTDB API directly. NOTE: This should only be used in very exceptional circumstances where direct access to the API is needed (e.g. for testing purposes). Use any other method where possible.- Returns:
- IXtdb
-
equals
Default equality comparison.- Overrides:
equalsin classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Parameters:
o- object to compare against- Returns:
- boolean
-
hashCode
public int hashCode()Default hash calculation.- Overrides:
hashCodein classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Returns:
- int
-