Class CSFLELicense
java.lang.Object
io.confluent.license.License
io.confluent.license.CSFLELicense
-
Nested Class Summary
Nested classes/interfaces inherited from class io.confluent.license.License
License.DeploymentScope, License.LicenseSubType, License.Type -
Constructor Summary
ConstructorsConstructorDescriptionCSFLELicense(org.jose4j.jwt.JwtClaims claims, org.apache.kafka.common.utils.Time clock, String serialized) Create a license with the suppliedJWT Claims. -
Method Summary
Modifier and TypeMethodDescriptionbooleanexpiresBefore(License other) Determine if this license expires before the specified licensebooleanisCSFLE()booleanDetermine whether this license has expired.booleanisRenewalOf(License other) Determine if this license is a strict renewal of the specified license.booleanisValid()Determine whether this license is currently valid.longtimeRemaining(TimeUnit unit) Get the amount of time in the specified units that remains before the license expires.toString()type()Get the type of license.Methods inherited from class io.confluent.license.License
audience, audienceString, baseClaims, deploymentScope, equals, expirationDate, expirationDateString, generateTrialLicense, getAudience, getExpiration, getLicenseSubType, hashCode, isEnterprise, isEquivalentTo, isFreeTier, isInvalidLicense, isTrial, isUpdatedWithSameExpiry, licenseId, loadPrivateKey, loadPublicKey, loadPublicKey, platformId, serializedForm, sign, subject, verify, verifyMonitoring, verifyStored
-
Constructor Details
-
CSFLELicense
public CSFLELicense(org.jose4j.jwt.JwtClaims claims, org.apache.kafka.common.utils.Time clock, String serialized) Create a license with the suppliedJWT Claims.- Parameters:
claims- the JWT claimsclock- the clock that can be used to compute theLicense.expirationDate(); may not be nullserialized- the serialized form of the license; may not be null
-
-
Method Details
-
toString
-
timeRemaining
Description copied from class:LicenseGet the amount of time in the specified units that remains before the license expires.- Overrides:
timeRemainingin classLicense- 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
-
isValid
-
type
Get the type of license. -
isCSFLE
public boolean isCSFLE() -
isRenewalOf
Description copied from class:LicenseDetermine if this license is a strict renewal of the specified license. This is essentially the same logic asLicense.isEquivalentTo(License)except theexpiration timeof this license must be later than the specified license.- Overrides:
isRenewalOfin classLicense- Parameters:
other- the other license- Returns:
- true if
otheris a renewal of thepreviouslicense
-
expiresBefore
Determine if this license expires before the specified license- Overrides:
expiresBeforein classLicense- Parameters:
other- the other license; may be null- Returns:
- true if the other license is null or this license expires before the other license
-