Class CSFLELicense

java.lang.Object
io.confluent.license.License
io.confluent.license.CSFLELicense

public class CSFLELicense extends License
  • Constructor Details

    • CSFLELicense

      public CSFLELicense(org.jose4j.jwt.JwtClaims claims, org.apache.kafka.common.utils.Time clock, String serialized)
      Create a license with the supplied JWT Claims.
      Parameters:
      claims - the JWT claims
      clock - the clock that can be used to compute the License.expirationDate(); may not be null
      serialized - the serialized form of the license; may not be null
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class License
    • timeRemaining

      public long timeRemaining(TimeUnit unit)
      Description copied from class: License
      Get the amount of time in the specified units that remains before the license expires.
      Overrides:
      timeRemaining in class License
      Parameters:
      unit - the unit for the returned time; may not be null
      Returns:
      the time remaining before the license expires; may be negative if the license is already expired
    • isExpired

      public boolean isExpired()
      Description copied from class: License
      Determine whether this license has expired.
      Overrides:
      isExpired in class License
      Returns:
      true if the license is expired, or false otherwise
    • isValid

      public boolean isValid()
      Description copied from class: License
      Determine whether this license is currently valid.
      Overrides:
      isValid in class License
      Returns:
      true if the license is valid, or false otherwise
    • type

      public License.Type type()
      Get the type of license.
      Overrides:
      type in class License
      Returns:
      the license type; never null
      See Also:
    • isCSFLE

      public boolean isCSFLE()
    • isRenewalOf

      public boolean isRenewalOf(License other)
      Description copied from class: License
      Determine if this license is a strict renewal of the specified license. This is essentially the same logic as License.isEquivalentTo(License) except the expiration time of this license must be later than the specified license.
      Overrides:
      isRenewalOf in class License
      Parameters:
      other - the other license
      Returns:
      true if other is a renewal of the previous license
    • expiresBefore

      public boolean expiresBefore(License other)
      Determine if this license expires before the specified license
      Overrides:
      expiresBefore in class License
      Parameters:
      other - the other license; may be null
      Returns:
      true if the other license is null or this license expires before the other license