Package org.ivoa.dm.executionbroker
Class DockerNetworkSpec
java.lang.Object
org.ivoa.dm.executionbroker.DockerNetworkSpec
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execbroker:DockerNetworkSpec",
role=objectType)
public class DockerNetworkSpec
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Details of the network access available to the container.
objectType: DockerNetworkSpec
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for DockerNetworkSpec, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Longinserted database keyprotected List<DockerNetworkPort>An array of network ports to publish. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DockerNetworkSpecDockerNetworkSpec(List<DockerNetworkPort> ports) full parameter constructor.Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a org.ivoa.dm.executionbroker.DockerNetworkPort to the composition.static DockerNetworkSpeccreate a DockerNetworkSpec in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidgetId()getPorts()Returns ports composition as an immutable list.voidRemove a org.ivoa.dm.executionbroker.DockerNetworkPort from the composition.voidupdate a org.ivoa.dm.executionbroker.DockerNetworkPort in the composition.voidsetPorts(List<DockerNetworkPort> pPorts) Defines whole ports composition.voidupdateUsing(DockerNetworkSpec other) Update this object with the content of the given object.
-
Field Details
-
_id
inserted database key -
ports
@VoDml(id="execbroker:DockerNetworkSpec.ports", role=composition, type="execbroker:DockerNetworkPort", typeRole=objectType) protected List<DockerNetworkPort> portsAn array of network ports to publish. composition ports : ( Multiplicity : 1..* )
-
-
Constructor Details
-
DockerNetworkSpec
public DockerNetworkSpec()Creates a new DockerNetworkSpec -
DockerNetworkSpec
full parameter constructor.- Parameters:
ports- An array of network ports to publish.
-
DockerNetworkSpec
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Returns:
- the id
-
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.
-
getPorts
Returns ports composition as an immutable list.- Returns:
- ports composition.
-
setPorts
Defines whole ports composition.- Parameters:
pPorts- composition to set.
-
addToPorts
Add a org.ivoa.dm.executionbroker.DockerNetworkPort to the composition.- Parameters:
p- org.ivoa.dm.executionbroker.DockerNetworkPort to add
-
removeFromPorts
Remove a org.ivoa.dm.executionbroker.DockerNetworkPort from the composition.- Parameters:
p- org.ivoa.dm.executionbroker.DockerNetworkPort to remove
-
replaceInPorts
update a org.ivoa.dm.executionbroker.DockerNetworkPort in the composition.- Parameters:
_p- org.ivoa.dm.executionbroker.DockerNetworkPort to update the match is done via the database key
-
createDockerNetworkSpec
public static DockerNetworkSpec createDockerNetworkSpec(Consumer<DockerNetworkSpec.DockerNetworkSpecBuilder> f) create a DockerNetworkSpec 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
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-