Class DataClayObjectLoader

  • Direct Known Subclasses:
    ClientObjectLoader, ExecutionObjectLoader

    public abstract class DataClayObjectLoader
    extends Object
    This class is responsable to create DataClayObjects and load them with data coming from different resources. All possible constructions of DataClayObject should be included here. All possible "filling instance" use-cases should be managed here. Most of lockers should be located here.
    • Field Detail

      • logger

        protected static final org.apache.logging.log4j.Logger logger
      • DEBUG_ENABLED

        protected static final boolean DEBUG_ENABLED
        Indicates if debug is enabled.
    • Constructor Detail

      • DataClayObjectLoader

        public DataClayObjectLoader()
        Constructor
    • Method Detail

      • newInstance

        protected abstract DataClayObject newInstance​(MetaClassID classID,
                                                      ObjectID objectID)
        Create a new instance using proper class loader
        Parameters:
        classID - ID of class
        objectID - ID of object
        Returns:
        Instance
      • getRuntime

        protected abstract DataClayRuntime getRuntime()
        Get runtime
        Returns:
        The runtime being managed.
      • getOrNewPersistentInstance

        public DataClayObject getOrNewPersistentInstance​(MetaClassID classID,
                                                         ObjectID objectID,
                                                         BackendID hint)
        Check if instance exists in Heap or create a new PERSISTENT instance if needed
        Parameters:
        classID - ID of the class in case it is needed (not need to query) if null, look for class id in metadata.
        objectID - ID of object
        hint - Can be null. Hint in case object is a volatile in another DS and we need information.
        Returns:
        Instance
      • newInstanceInternal

        protected DataClayObject newInstanceInternal​(MetaClassID classID,
                                                     ObjectID objectID,
                                                     BackendID hint)
        Create a new instance using proper class loader
        Parameters:
        classID - ID of the class in case it is needed (not need to query) if null, look for class id in metadata.
        objectID - ID of object
        hint - Can be null. Hint in case object is a volatile in another DS and we need information.
        Returns:
        Instance
      • getOrNewAndLoadVolatile

        public DataClayObject getOrNewAndLoadVolatile​(MetaClassID classID,
                                                      ObjectID objectID,
                                                      BackendID hint,
                                                      ObjectWithDataParamOrReturn objWithData,
                                                      Map<MetaClassID,​byte[]> ifaceBitMaps)
        Get from Heap or create a new volatile in EE and load data on it.
        Parameters:
        classID - ID of class of the object
        objectID - ID of the object
        hint - Hint of the object
        objWithData - Data of the object
        ifaceBitMaps - Interface bitmaps
        Returns:
        Loaded volatile instance in EE.
      • deserializeDataIntoInstance

        public abstract void deserializeDataIntoInstance​(DataClayObject instance,
                                                         ObjectWithDataParamOrReturn data,
                                                         Map<MetaClassID,​byte[]> ifaceBitMaps)
        Deserialize data into instance.
        Parameters:
        instance - Instance to be filled.
        data - Data
        ifaceBitMaps - Interface bitmaps