Package es.bsc.dataclay.loader
Class DataClayObjectLoader
- java.lang.Object
-
- es.bsc.dataclay.loader.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 Summary
Fields Modifier and Type Field Description protected static boolean
DEBUG_ENABLED
Indicates if debug is enabled.protected static org.apache.logging.log4j.Logger
logger
-
Constructor Summary
Constructors Constructor Description DataClayObjectLoader()
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
deserializeDataIntoInstance(DataClayObject instance, ObjectWithDataParamOrReturn data, Map<MetaClassID,byte[]> ifaceBitMaps)
Deserialize data into instance.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.DataClayObject
getOrNewPersistentInstance(MetaClassID classID, ObjectID objectID, BackendID hint)
Check if instance exists in Heap or create a new PERSISTENT instance if neededprotected abstract DataClayRuntime
getRuntime()
Get runtimeprotected abstract DataClayObject
newInstance(MetaClassID classID, ObjectID objectID)
Create a new instance using proper class loaderprotected DataClayObject
newInstanceInternal(MetaClassID classID, ObjectID objectID, BackendID hint)
Create a new instance using proper class loader
-
-
-
Method Detail
-
newInstance
protected abstract DataClayObject newInstance(MetaClassID classID, ObjectID objectID)
Create a new instance using proper class loader- Parameters:
classID
- ID of classobjectID
- 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 objecthint
- 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 objecthint
- 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 objectobjectID
- ID of the objecthint
- Hint of the objectobjWithData
- Data of the objectifaceBitMaps
- 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
- DataifaceBitMaps
- Interface bitmaps
-
-