Class PersistenceLayer
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.model.PersistenceLayer
Manages the persistence layer: for now, primarily indicating the version of the connector for
which data has been persisted, to validate migration starting points.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static xtdb.api.XtdbDocument
getPersistenceDetails
(xtdb.api.IXtdb xtdbAPI) Retrieve details about the persistence layer from the provided XTDB back-end.static long
getVersion
(xtdb.api.IXtdb xtdbAPI) Retrieve the version of the persistence layer for the provided XTDB back-end.static boolean
isLatestVersion
(xtdb.api.IXtdb xtdbAPI) Check whether the persistence layer for the provided XTDB back-end is the latest or not.static void
setVersion
(xtdb.api.IXtdb xtdbAPI, long version) Set the version of the persistence layer for the provided XTDB back-end.
-
Field Details
-
LATEST_VERSION
public static final long LATEST_VERSION- See Also:
-
-
Method Details
-
getVersion
public static long getVersion(xtdb.api.IXtdb xtdbAPI) Retrieve the version of the persistence layer for the provided XTDB back-end.- Parameters:
xtdbAPI
- the XTDB back-end for which to retrieve the persistence layer version- Returns:
- the version of the persistence layer
-
setVersion
public static void setVersion(xtdb.api.IXtdb xtdbAPI, long version) Set the version of the persistence layer for the provided XTDB back-end. CAUTION: this is used for migration purposes, so should not be set by anything other than migration utilities.- Parameters:
xtdbAPI
- the XTDB back-end for which to set the persistence layer versionversion
- to set
-
isLatestVersion
public static boolean isLatestVersion(xtdb.api.IXtdb xtdbAPI) Check whether the persistence layer for the provided XTDB back-end is the latest or not.- Parameters:
xtdbAPI
- the XTDB back-end for which to check the persistence layer version- Returns:
- true if it is at the latest version, otherwise false
-
getPersistenceDetails
protected static xtdb.api.XtdbDocument getPersistenceDetails(xtdb.api.IXtdb xtdbAPI) Retrieve details about the persistence layer from the provided XTDB back-end.- Parameters:
xtdbAPI
- the XTDB back-end for which to retrieve the persistence layer details- Returns:
- XtdbDocument containing the details (or null if there are none)
-