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 whichInstance
s 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 boolean
equals(java.lang.Object o)
java.lang.String
getSticky()
java.lang.Integer
getTeamLimit()
java.lang.Integer
getUserLimit()
int
hashCode()
boolean
isSingleUser()
-
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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-