Class ExecutionObjectLoader


  • public class ExecutionObjectLoader
    extends DataClayObjectLoader
    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.
    • Constructor Detail

      • ExecutionObjectLoader

        public ExecutionObjectLoader​(DataServiceRuntime theruntime)
        Constructor
        Parameters:
        theruntime - Runtime being managed
    • Method Detail

      • getOrNewPersistentInstance

        public DataClayExecutionObject getOrNewPersistentInstance​(MetaClassID classID,
                                                                  ObjectID objectID,
                                                                  BackendID hint)
        Check if instance exists in objects map or create a new PERSISTENT instance if needed
        Overrides:
        getOrNewPersistentInstance in class DataClayObjectLoader
        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
      • getOrNewPersistentInstanceFromDB

        public DataClayExecutionObject getOrNewPersistentInstanceFromDB​(ObjectID objectID,
                                                                        boolean retry)
        Get object from memory or database and WAIT in case we are still waiting for it to be persisted.
        Parameters:
        objectID - ID of the object to get
        retry - Indicates if we should retry and wait.
        Returns:
        The the object.
      • loadDataClayObjectFromDb

        public void loadDataClayObjectFromDb​(DataClayExecutionObject objectToFill,
                                             boolean retry)
        Load DataClayObject from Database
        Parameters:
        objectToFill - DataClayObject instance to fill
        retry - Indicates retry loading in case it is not in db.