Class CloudStateHolder.InstanceState

    • Method Detail

      • getInstanceId

        @NotNull
        public String getInstanceId()
        Description copied from interface: CloudInstance
        Returns the instance identifier.

        Must be unique within the profile.
        Specified by:
        getInstanceId in interface CloudInstance
        Returns:
        instance identifier.
      • getName

        @NotNull
        public String getName()
        Description copied from interface: CloudInstance
        Name of the instance. Name may change in the time.
        Specified by:
        getName in interface CloudInstance
        Returns:
        name
      • getImage

        @NotNull
        public CloudImage getImage()
        Description copied from interface: CloudInstance
        Returns the reference to the handle of the image this instance started from.
        Specified by:
        getImage in interface CloudInstance
        Returns:
        reference to the image descriptor (all instances started from one image returns a reference to the same java object).
      • getStartedTime

        @NotNull
        public Date getStartedTime()
        Description copied from interface: CloudInstance
        Returns the instance started time.
        Specified by:
        getStartedTime in interface CloudInstance
        Returns:
        started time.
      • getNetworkIdentity

        @Nullable
        public String getNetworkIdentity()
        Description copied from interface: CloudInstance
        Returns the instance's DNS name (if one exists) or IPv4 address (if no DNS names).
        Specified by:
        getNetworkIdentity in interface CloudInstance
        Returns:
        DNS name (in form "host.domain.com") or IPv4 address (in form "12.34.56.78"), or null if the identity is unknown at this moment. Never returns empty strings.
      • setExpired

        public void setExpired()
      • isExpired

        public boolean isExpired()
      • getAgentId

        public int getAgentId()
      • setAgentId

        public void setAgentId​(int agentId)
      • containsAgent

        public boolean containsAgent​(@NotNull
                                     AgentDescription agentDescription)
        Description copied from interface: CloudInstance
        Checks is the agent is running under this instance
        Specified by:
        containsAgent in interface CloudInstance
        Parameters:
        agentDescription - agent to check
        Returns:
        true is agent is running under the instance
      • updateIfNecessary

        public boolean updateIfNecessary​(@NotNull
                                         CloudInstance instance,
                                         int agentId)
        returns true if instance was updated and false otherwise
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object