Class Allocation
- java.lang.Object
-
- uk.co.ractf.polaris.api.common.JsonRepresentable
-
- uk.co.ractf.polaris.api.deployment.Allocation
-
public class Allocation extends JsonRepresentable
Represents the constraints within whichInstances should be allocated to users{ "sticky": "user", "userLimit": 3, "teamLimit": 3 }
-
-
Constructor Summary
Constructors Constructor Description Allocation(java.lang.String sticky, java.lang.Integer userLimit, java.lang.Integer teamLimit, boolean singleUser)Create an allocation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetSticky()java.lang.IntegergetTeamLimit()java.lang.IntegergetUserLimit()inthashCode()booleanisSingleUser()-
Methods inherited from class uk.co.ractf.polaris.api.common.JsonRepresentable
parse, toJsonString
-
-
-
-
Constructor Detail
-
Allocation
@Contract(pure=true) public Allocation(java.lang.String sticky, java.lang.Integer userLimit, java.lang.Integer teamLimit, boolean singleUser)Create an allocation- Parameters:
sticky- should the allocator make instances sticky on "user" or "team"userLimit- max amount of users on an instanceteamLimit- max amount of teams on an instancesingleUser-
-
-
Method Detail
-
getSticky
public java.lang.String getSticky()
-
getUserLimit
public java.lang.Integer getUserLimit()
-
getTeamLimit
public java.lang.Integer getTeamLimit()
-
isSingleUser
public boolean isSingleUser()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-