Class PersistenceLayer
- java.lang.Object
-
- org.odpi.egeria.connectors.juxt.crux.model.PersistenceLayer
-
public class PersistenceLayer extends Object
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
Fields Modifier and Type Field Description static longLATEST_VERSION
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static crux.api.CruxDocumentgetPersistenceDetails(crux.api.ICruxAPI cruxAPI)Retrieve details about the persistence layer from the provided Crux back-end.static longgetVersion(crux.api.ICruxAPI cruxAPI)Retrieve the version of the persistence layer for the provided Crux back-end.static booleanisLatestVersion(crux.api.ICruxAPI cruxAPI)Check whether the persistence layer for the provided Crux back-end is the latest or not.static voidsetVersion(crux.api.ICruxAPI cruxAPI, long version)Set the version of the persistence layer for the provided Crux back-end.
-
-
-
Field Detail
-
LATEST_VERSION
public static final long LATEST_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getVersion
public static long getVersion(crux.api.ICruxAPI cruxAPI)
Retrieve the version of the persistence layer for the provided Crux back-end.- Parameters:
cruxAPI- the Crux back-end for which to retrieve the persistence layer version- Returns:
- the version of the persistence layer
-
setVersion
public static void setVersion(crux.api.ICruxAPI cruxAPI, long version)Set the version of the persistence layer for the provided Crux back-end. CAUTION: this is used for migration purposes, so should not be set by anything other than migration utilities.- Parameters:
cruxAPI- the Crux back-end for which to set the persistence layer versionversion- to set
-
isLatestVersion
public static boolean isLatestVersion(crux.api.ICruxAPI cruxAPI)
Check whether the persistence layer for the provided Crux back-end is the latest or not.- Parameters:
cruxAPI- the Crux back-end for which to check the persistence layer version- Returns:
- true if it is at the latest version, otherwise false
-
getPersistenceDetails
protected static crux.api.CruxDocument getPersistenceDetails(crux.api.ICruxAPI cruxAPI)
Retrieve details about the persistence layer from the provided Crux back-end.- Parameters:
cruxAPI- the Crux back-end for which to retrieve the persistence layer details- Returns:
- CruxDocument containing the details (or null if there are none)
-
-