Class MembershipStatus


  • public class MembershipStatus
    extends java.lang.Object
    The pool membership status indicates if a Machine needs to be given special treatment.

    The membership status for a machine can, for example, be set to protect the machine from being terminated (by settings its evictability status) or to mark a machine as being in need of replacement by flagging it as an inactive pool member.

    See Also:
    Machine, MachinePool, CloudPool
    • Constructor Detail

      • MembershipStatus

        public MembershipStatus()
        Creates a default MembershipStatus that marks a machine both active and evictable.
      • MembershipStatus

        public MembershipStatus​(boolean active,
                                boolean evictable)
        Creates a MembershipStatus for a machine.
        Parameters:
        active - Indicates if this is an active (working) MachinePool member. A false value, indicates to the CloudPool that a replacement machine needs to be launched for this pool member (at least until this machine has been troubleshooted and had its active flag set back to true).
        evictable - Indicates if this Machine is a blessed member of the MachinePool. If true, the CloudPool may not terminate this machine.
    • Method Detail

      • blessed

        public static MembershipStatus blessed()
        Creates a MembershipStatus that marks a machine as blessed (or a permanent pool member that cannot be evicted).
        Returns:
      • awaitingService

        public static MembershipStatus awaitingService()
        Creates a MembershipStatus that marks a machine as being non-functional (i.e. inactive) and in need of service. The Machine should be replaced and should not be terminated (it is kept alive for troubleshooting).
        Returns:
      • disposable

        public static MembershipStatus disposable()
        Creates a MembershipStatus that marks a machine as being non-functional (i.e. inactive) and in need of replacement. The Machine should be replaced and can be terminated.
        Returns:
      • isActive

        public boolean isActive()
        Indicates if this is an active (working) MachinePool member. A false value, indicates to the CloudPool that a replacement machine needs to be launched for this pool member (at least until this machine has been troubleshooted and had its active flag set back to true).
        Returns:
      • isEvictable

        public boolean isEvictable()
        Indicates if this Machine is a blessed member of the MachinePool. If true, the CloudPool may not terminate this machine.
        Returns:
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object