Class RegistryMetadata
java.lang.Object
org.gcube.informationsystem.registry.RegistryMetadata
A registry's record of the models it holds. Every type belongs to exactly one of them:
information-system-model, the domain model installed from the classpath, or the runtime
model holding the types created through REST. Each counts the schema writes on its types since
the last migration, next to a global count of every schema write. It is not a model
Element: it describes a registry, not the information it holds. A System Dump carries it,
so that the dump can be read with this model alone.
Unknown fields are ignored, so that a reader built on an older version still reads what a newer one writes.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the models of the registry, keyed by model name.longReturns the number of schema writes since the last migration, whatever the model: the schema version the type caches are keyed on.voidsetModels(Map<String, RegistryModel> models) Sets the models of the registry.voidsetRevisionCount(long revisionCount) Sets the number of schema writes since the last migration.
-
Field Details
-
NAME
The name of the record, as stored.- See Also:
-
MODELS_PROPERTY
Name of the models field.- See Also:
-
REVISION_COUNT_PROPERTY
Name of the revision count field.- See Also:
-
-
Constructor Details
-
RegistryMetadata
public RegistryMetadata()
-
-
Method Details
-
getModels
Returns the models of the registry, keyed by model name.- Returns:
- the models keyed by name
-
setModels
Sets the models of the registry.- Parameters:
models- the models keyed by name
-
getRevisionCount
public long getRevisionCount()Returns the number of schema writes since the last migration, whatever the model: the schema version the type caches are keyed on.- Returns:
- the revision count
-
setRevisionCount
public void setRevisionCount(long revisionCount) Sets the number of schema writes since the last migration.- Parameters:
revisionCount- the revision count
-