Package org.ivoa.dm.executionbroker
Class SimpleComputeResource
java.lang.Object
org.ivoa.dm.executionbroker.AbstractComponent
org.ivoa.dm.executionbroker.LifecycleComponent
org.ivoa.dm.executionbroker.AbstractComputeResource
org.ivoa.dm.executionbroker.SimpleComputeResource
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execbroker:SimpleComputeResource",
role=objectType)
public class SimpleComputeResource
extends AbstractComputeResource
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A simple compute resource.
objectType: SimpleComputeResource
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for SimpleComputeResource, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SimpleComputeCores.protected SimpleComputeMemory.A list of the filesystem volumes to mount.Fields inherited from class org.ivoa.dm.executionbroker.LifecycleComponent
phase, scheduleFields inherited from class org.ivoa.dm.executionbroker.AbstractComponent
_id, kind, meta -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SimpleComputeResourceSimpleComputeResource(AbstractComputeResource superinstance, SimpleComputeCores cores, SimpleComputeMemory memory, List<String> volumes) Constructor from supertype instance.SimpleComputeResource(SimpleComputeCores cores, SimpleComputeMemory memory, List<String> volumes, LifecyclePhase phase, LifecycleSchedule schedule, String kind, ComponentMetadata meta) full parameter constructor.Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopyMe()make a clone of the object taking into account current polymorhic type.static SimpleComputeResourcecreate a SimpleComputeResource in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidgetCores()Returns cores Attribute.Returns memory Attribute.Returns volumes Attribute.voidsetCores(SimpleComputeCores pCores) Set cores Attribute.voidsetMemory(SimpleComputeMemory pMemory) Set memory Attribute.voidsetVolumes(List<String> pVolumes) Set volumes Attribute.voidupdateUsing(SimpleComputeResource other) Update this object with the content of the given object.withCores(SimpleComputeCores pCores) fluent setter for cores Attribute.withMemory(SimpleComputeMemory pMemory) fluent setter for memory Attribute.withVolumes(List<String> pVolumes) fluent setter for volumes Attribute.Methods inherited from class org.ivoa.dm.executionbroker.AbstractComputeResource
updateUsingMethods inherited from class org.ivoa.dm.executionbroker.LifecycleComponent
getPhase, getSchedule, setPhase, setSchedule, updateUsing, withPhase, withScheduleMethods inherited from class org.ivoa.dm.executionbroker.AbstractComponent
getId, getKind, getMeta, setKind, setMeta, updateUsing, withKind, withMetaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getId
-
Field Details
-
cores
@VoDml(id="execbroker:SimpleComputeResource.cores", role=attribute, type="execbroker:SimpleComputeCores", typeRole=dataType) protected SimpleComputeCores cores. : Attribute cores : multiplicity 1 -
memory
@VoDml(id="execbroker:SimpleComputeResource.memory", role=attribute, type="execbroker:SimpleComputeMemory", typeRole=dataType) protected SimpleComputeMemory memory. : Attribute memory : multiplicity 1 -
volumes
@VoDml(id="execbroker:SimpleComputeResource.volumes", role=attribute, type="ivoa:string", typeRole=primitiveType) protected List<String> volumesA list of the filesystem volumes to mount. : Attribute volumes : multiplicity 1..*
-
-
Constructor Details
-
SimpleComputeResource
public SimpleComputeResource()Creates a new SimpleComputeResource -
SimpleComputeResource
public SimpleComputeResource(SimpleComputeCores cores, SimpleComputeMemory memory, List<String> volumes, LifecyclePhase phase, LifecycleSchedule schedule, String kind, ComponentMetadata meta) full parameter constructor.- Parameters:
cores- .memory- .volumes- A list of the filesystem volumes to mount.phase- The lifecycle phase.schedule- The lifecycle schedule.kind- The component type identifier.meta- The component metadata.
-
SimpleComputeResource
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
SimpleComputeResource
public SimpleComputeResource(AbstractComputeResource superinstance, SimpleComputeCores cores, SimpleComputeMemory memory, List<String> volumes) Constructor from supertype instance.- Parameters:
superinstance- The supertype.cores- .memory- .volumes- A list of the filesystem volumes to mount.
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Specified by:
copyMein classAbstractComputeResource- Returns:
- the cloned object.
-
updateUsing
Update this object with the content of the given object. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
getCores
Returns cores Attribute.- Returns:
- cores Attribute
-
setCores
Set cores Attribute.- Parameters:
pCores- value to set
-
withCores
fluent setter for cores Attribute.- Parameters:
pCores- value to set- Returns:
- SimpleComputeResource
-
getMemory
Returns memory Attribute.- Returns:
- memory Attribute
-
setMemory
Set memory Attribute.- Parameters:
pMemory- value to set
-
withMemory
fluent setter for memory Attribute.- Parameters:
pMemory- value to set- Returns:
- SimpleComputeResource
-
getVolumes
Returns volumes Attribute.- Returns:
- volumes Attribute
-
setVolumes
Set volumes Attribute.- Parameters:
pVolumes- value to set
-
withVolumes
fluent setter for volumes Attribute.- Parameters:
pVolumes- value to set- Returns:
- SimpleComputeResource
-
createSimpleComputeResource
public static SimpleComputeResource createSimpleComputeResource(Consumer<SimpleComputeResource.SimpleComputeResourceBuilder> f) create a SimpleComputeResource in functional builder style.- Parameters:
f- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations- Overrides:
forceLoadin classAbstractComputeResource
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-