Class SpaceInstLazyDataLoader

  • All Implemented Interfaces:
    Serializable

    public class SpaceInstLazyDataLoader
    extends Object
    implements Serializable
    This class handles the lazy loading of following data of a SpaceInst:
    • profiles, SpaceProfileInst are managed. Specifically about space profiles, the list of profiles of this loader can be used into processes of space creation and space profile spreading
    • sub spaces, the loader hosts only the identifier of sub spaces but provided in reading mode copies of linked SpaceInst from AdminCache
    • components, same mechanism as sub spaces one, but with component instances

    The aim of this lazy loading is about avoiding to walk through the entire space tree when loading a space from repository.
    It permits to get rapidly a space from repository if not yet into cache, and to load later the linked data which are not necessary used just after repository get.

    When a SpaceInst is put into AdminCache, cached instances MUST be loaded in order to avoid that the cache provides each time unloaded data (cache provides copies of data).

    Technically, if load has not yet been performed, then all data are loaded before performing process given to safeRead(Function) or safeWrite(Consumer) method.

    Author:
    silveryocha
    See Also:
    Serialized Form
    • Method Detail

      • load

        protected void load()
        This method handles the load of the missing data.
        API Note:
        the load is performed only if the loader is not yet marked as loaded (loaded at false value).
        Implementation Note:
        be very carefully to call this method into synchronized context mutex.