Class Allocation


  • public class Allocation
    extends JsonRepresentable
    Represents the constraints within which Instances 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
    • 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 instance
        teamLimit - max amount of teams on an instance
        singleUser -
    • 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 class java.lang.Object
      • hashCode

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