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_VALUEfor none.maxServers- The server limit,Integer.MAX_VALUEfor 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 Summary
ConstructorsConstructorDescriptionMemberLicence(String licence, String entitlement, String product, int maxUsers, int maxServers, long expires, String state) Creates an instance of aMemberLicencerecord class.Method Summary
Modifier and TypeMethodDescriptionReturns the value of theentitlementrecord component.final booleanIndicates whether some other object is "equal to" this one.longexpires()Returns the value of theexpiresrecord component.final inthashCode()Returns a hash code value for this object.licence()Returns the value of thelicencerecord component.intReturns the value of themaxServersrecord component.intmaxUsers()Returns the value of themaxUsersrecord component.product()Returns the value of theproductrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
Constructor Details
MemberLicence
public MemberLicence(String licence, String entitlement, String product, int maxUsers, int maxServers, long expires, String state) Creates an instance of aMemberLicencerecord class.- Parameters:
licence- the value for thelicencerecord componententitlement- the value for theentitlementrecord componentproduct- the value for theproductrecord componentmaxUsers- the value for themaxUsersrecord componentmaxServers- the value for themaxServersrecord componentexpires- the value for theexpiresrecord componentstate- the value for thestaterecord component
Method Details
toString
hashCode
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes.licence
entitlement
Returns the value of theentitlementrecord component.- Returns:
- the value of the
entitlementrecord component
product
maxUsers
maxServers
public int maxServers()Returns the value of themaxServersrecord component.- Returns:
- the value of the
maxServersrecord component
expires
state