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
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • ports

      @VoDml(id="execbroker:DockerNetworkSpec.ports", role=composition, type="execbroker:DockerNetworkPort", typeRole=objectType) protected List<DockerNetworkPort> ports
      An array of network ports to publish. composition ports : ( Multiplicity : 1..* )
  • Constructor Details

    • DockerNetworkSpec

      public DockerNetworkSpec()
      Creates a new DockerNetworkSpec
    • DockerNetworkSpec

      public DockerNetworkSpec(List<DockerNetworkPort> ports)
      full parameter constructor.
      Parameters:
      ports - An array of network ports to publish.
    • DockerNetworkSpec

      public DockerNetworkSpec(DockerNetworkSpec other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • updateUsing

      public void updateUsing(DockerNetworkSpec other)
      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

      public List<DockerNetworkPort> getPorts()
      Returns ports composition as an immutable list.
      Returns:
      ports composition.
    • setPorts

      public void setPorts(List<DockerNetworkPort> pPorts)
      Defines whole ports composition.
      Parameters:
      pPorts - composition to set.
    • addToPorts

      public void addToPorts(DockerNetworkPort p)
      Add a org.ivoa.dm.executionbroker.DockerNetworkPort to the composition.
      Parameters:
      p - org.ivoa.dm.executionbroker.DockerNetworkPort to add
    • removeFromPorts

      public void removeFromPorts(DockerNetworkPort p)
      Remove a org.ivoa.dm.executionbroker.DockerNetworkPort from the composition.
      Parameters:
      p - org.ivoa.dm.executionbroker.DockerNetworkPort to remove
    • replaceInPorts

      public void replaceInPorts(DockerNetworkPort _p)
      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:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
    • delete

      public void delete(jakarta.persistence.EntityManager em)
      Specified by:
      delete in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>