Class RegistryMetadata


  • public class RegistryMetadata
    extends Object
    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)
    • Constructor Detail

      • RegistryMetadata

        public RegistryMetadata()
    • Method Detail

      • getModels

        public Map<String,​RegistryModel> getModels()
        Returns the models of the registry, keyed by model name.
        Returns:
        the models keyed by name
      • setModels

        public void setModels​(Map<String,​RegistryModel> models)
        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