Record Class LicenseCounter.Status
java.lang.Object
java.lang.Record
com.iizix.server.user.LicenseCounter.Status
- Record Components:
reply- The licence system's validation, null when the server has no license system.users- The users counted now.maxUsers- The document'smaxUsers, -1 for no limit.ceiling- The ceiling, -1 for no limit.graceUntil- The end of the running grace episode, 0 for none.refuseFrom- When new sign-ins of an unlicensed server are to be refused, 0 while licensed.refusing- true when a new user's sign-in now would be refused (ServerAdmin excepted).enforcing- true when the enforcement switch is on.
- Enclosing class:
LicenseCounter
public static record LicenseCounter.Status(ValidateReply reply, int users, int maxUsers, int ceiling, long graceUntil, long refuseFrom, boolean refusing, boolean enforcing) extends Record
What ServerAdmin shows (T1-154): the licence state, the users against
maxUsers, the grace and what a new sign-in would meet now.- Author:
- Christopher Mindus
Constructor Summary
ConstructorsConstructorDescriptionStatus(ValidateReply reply, int users, int maxUsers, int ceiling, long graceUntil, long refuseFrom, boolean refusing, boolean enforcing) Creates an instance of aStatusrecord class.Method Summary
Modifier and TypeMethodDescriptionintceiling()Returns the value of theceilingrecord component.booleanReturns the value of theenforcingrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thegraceUntilrecord component.final inthashCode()Returns a hash code value for this object.booleanTells whether more users are counted than the licence allows.intmaxUsers()Returns the value of themaxUsersrecord component.longReturns the value of therefuseFromrecord component.booleanrefusing()Returns the value of therefusingrecord component.reply()Returns the value of thereplyrecord component.final StringtoString()Returns a string representation of this record class.intusers()Returns the value of theusersrecord component.
Constructor Details
Status
public Status(ValidateReply reply, int users, int maxUsers, int ceiling, long graceUntil, long refuseFrom, boolean refusing, boolean enforcing) Creates an instance of aStatusrecord class.- Parameters:
reply- the value for thereplyrecord componentusers- the value for theusersrecord componentmaxUsers- the value for themaxUsersrecord componentceiling- the value for theceilingrecord componentgraceUntil- the value for thegraceUntilrecord componentrefuseFrom- the value for therefuseFromrecord componentrefusing- the value for therefusingrecord componentenforcing- the value for theenforcingrecord component
Method Details
isOverLimit
public boolean isOverLimit()Tells whether more users are counted than the licence allows.- Returns:
- true when over
maxUsers.
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.reply
users
maxUsers
ceiling
graceUntil
public long graceUntil()Returns the value of thegraceUntilrecord component.- Returns:
- the value of the
graceUntilrecord component
refuseFrom
public long refuseFrom()Returns the value of therefuseFromrecord component.- Returns:
- the value of the
refuseFromrecord component
refusing
enforcing