Class MembershipStatus
- java.lang.Object
-
- com.elastisys.scale.cloudpool.api.types.MembershipStatus
-
public class MembershipStatus extends java.lang.ObjectThe pool membership status indicates if aMachineneeds 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 Summary
Constructors Constructor Description MembershipStatus()Creates a defaultMembershipStatusthat marks a machine both active and evictable.MembershipStatus(boolean active, boolean evictable)Creates aMembershipStatusfor a machine.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MembershipStatusawaitingService()Creates aMembershipStatusthat marks a machine as being non-functional (i.e.static MembershipStatusblessed()Creates aMembershipStatusthat marks a machine as blessed (or a permanent pool member that cannot be evicted).static MembershipStatusdefaultStatus()Creates a defaultMembershipStatusthat marks a machine both active and evictable.static MembershipStatusdisposable()Creates aMembershipStatusthat marks a machine as being non-functional (i.e.booleanequals(java.lang.Object obj)inthashCode()booleanisActive()Indicates if this is an active (working)MachinePoolmember.booleanisEvictable()Indicates if thisMachineis a blessed member of theMachinePool.java.lang.StringtoString()
-
-
-
Constructor Detail
-
MembershipStatus
public MembershipStatus()
Creates a defaultMembershipStatusthat marks a machine both active and evictable.
-
MembershipStatus
public MembershipStatus(boolean active, boolean evictable)Creates aMembershipStatusfor a machine.- Parameters:
active- Indicates if this is an active (working)MachinePoolmember. Afalsevalue, indicates to theCloudPoolthat a replacement machine needs to be launched for this pool member (at least until this machine has been troubleshooted and had itsactiveflag set back totrue).evictable- Indicates if thisMachineis a blessed member of theMachinePool. Iftrue, theCloudPoolmay not terminate this machine.
-
-
Method Detail
-
defaultStatus
public static MembershipStatus defaultStatus()
Creates a defaultMembershipStatusthat marks a machine both active and evictable.- Returns:
-
blessed
public static MembershipStatus blessed()
Creates aMembershipStatusthat marks a machine as blessed (or a permanent pool member that cannot be evicted).- Returns:
-
awaitingService
public static MembershipStatus awaitingService()
Creates aMembershipStatusthat marks a machine as being non-functional (i.e. inactive) and in need of service. TheMachineshould be replaced and should not be terminated (it is kept alive for troubleshooting).- Returns:
-
disposable
public static MembershipStatus disposable()
Creates aMembershipStatusthat marks a machine as being non-functional (i.e. inactive) and in need of replacement. TheMachineshould be replaced and can be terminated.- Returns:
-
isActive
public boolean isActive()
Indicates if this is an active (working)MachinePoolmember. Afalsevalue, indicates to theCloudPoolthat a replacement machine needs to be launched for this pool member (at least until this machine has been troubleshooted and had itsactiveflag set back totrue).- Returns:
-
isEvictable
public boolean isEvictable()
Indicates if thisMachineis a blessed member of theMachinePool. Iftrue, theCloudPoolmay not terminate this machine.- Returns:
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-