Record Class MemberLicence

java.lang.Object
java.lang.Record
com.iizix.server.loadbalancer.MemberLicence
Record Components:
licence - The licence UUID.
entitlement - The entitlement UUID: one hub, one entitlement (ruled LV-13 (a)).
product - The product.
maxUsers - The user limit, Integer.MAX_VALUE for none.
maxServers - The server limit, Integer.MAX_VALUE for none.
expires - The expiry, epoch milliseconds, 0 for none.
state - The document's state, e.g. active.

public record MemberLicence(String licence, String entitlement, String product, int maxUsers, int maxServers, long expires, String state) extends Record
What IHubLicence.verifyMember(String, byte[], byte[], String, byte[]) answers for an admitted member, LICENSE-V2-DESIGN.md section 13: the licence and entitlement identities, the product, the limits, the expiry and the state. D-LIC defines the values; the hub carries them.
Author:
Christopher Mindus
  • Constructor Details

    • MemberLicence

      public MemberLicence(String licence, String entitlement, String product, int maxUsers, int maxServers, long expires, String state)
      Creates an instance of a MemberLicence record class.
      Parameters:
      licence - the value for the licence record component
      entitlement - the value for the entitlement record component
      product - the value for the product record component
      maxUsers - the value for the maxUsers record component
      maxServers - the value for the maxServers record component
      expires - the value for the expires record component
      state - the value for the state record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • licence

      public String licence()
      Returns the value of the licence record component.
      Returns:
      the value of the licence record component
    • entitlement

      public String entitlement()
      Returns the value of the entitlement record component.
      Returns:
      the value of the entitlement record component
    • product

      public String product()
      Returns the value of the product record component.
      Returns:
      the value of the product record component
    • maxUsers

      public int maxUsers()
      Returns the value of the maxUsers record component.
      Returns:
      the value of the maxUsers record component
    • maxServers

      public int maxServers()
      Returns the value of the maxServers record component.
      Returns:
      the value of the maxServers record component
    • expires

      public long expires()
      Returns the value of the expires record component.
      Returns:
      the value of the expires record component
    • state

      public String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component