Class TransientModelsProvider


  • public class TransientModelsProvider
    extends Object
    • Method Detail

      • getRepository

        public SRepository getRepository()
        Returns:
        repository where transient modules reside
      • clearAll

        protected void clearAll​(boolean dropCheckpoint)
      • createModule

        @NotNull
        public TransientModelsModule createModule​(@NotNull
                                                  String moduleName)
        Instantiate new transient, free-floating module with given moduleName augmented with implementation-specific stereotype. The module is NOT registered with any repository (including associated one). Transient modules get registered in the associated repository when publishAll() is requested. Thus, only publish activity would require write lock, while the transformation process is ok with a read on source model's repository. It's not final, though. If we manage to maintain distinct repository for transients, we still may lock it for write during transformation process (transitively locking source model's one for read) and there'd be no reason to be minimalistic about write lock then.
        Parameters:
        moduleName - name for a new transient module, without stereotype
        Returns:
        new module instance
      • getModule

        public TransientModelsModule getModule​(GeneratorTask task)
        XXX perhaps, GeneratorTask shall answer getTransientModule():SModule itself.
        Parameters:
        task - not null
        Returns:
        module to keep transients models of the task at
      • initCheckpointModule

        public void initCheckpointModule()
        Requires model write to register checkpoint module with a repository.
      • canKeepOneMore

        public boolean canKeepOneMore()
      • decreaseKeptModels

        public void decreaseKeptModels()
      • removeAllTransient

        public void removeAllTransient()
      • removeAllTransients

        public void removeAllTransients​(boolean includeCheckpoints)
      • startGeneration

        public void startGeneration​(int numberOfModelsToKeep)