Class Instance


  • public class Instance
    extends JsonRepresentable
    Represents an instance of a Challenge currently scheduled on Polaris
         {
             "id": "39b8db8f-c071-4aeb-aee3-147c4219688b",
             "deployment": "exampleDeployment1",
             "challenge": "hello-world",
             "host": "embedded"
         }
     
    • Constructor Detail

      • Instance

        @Contract(pure=true)
        public Instance​(java.lang.String id,
                        NamespacedId namespacedId,
                        java.lang.String hostId,
                        java.util.List<InstancePortBinding> portBindings,
                        java.util.Map<java.lang.String,​java.lang.String> randomEnv)
        Parameters:
        id - id of the instance
        namespacedId - the task id
        hostId - the node id
        portBindings - which ports should be bound
        randomEnv - the random env vars
    • Method Detail

      • getId

        public java.lang.String getId()
      • getNodeId

        public java.lang.String getNodeId()
      • getPortBindings

        public java.util.List<InstancePortBinding> getPortBindings()
        Returns:
        the ports the instance is using
      • getRandomEnv

        public java.util.Map<java.lang.String,​java.lang.String> getRandomEnv()
        Returns:
        the RandomEnv variables that have been generated for the pod
      • addPortBinding

        public void addPortBinding​(InstancePortBinding portBinding)
        Parameters:
        portBinding - the port binding to add
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object