public class ConfluentLicenseValidator extends Object implements org.apache.kafka.server.license.LicenseValidator, Consumer<LicenseChanged>
Modifier and Type | Class and Description |
---|---|
static class |
ConfluentLicenseValidator.LicenseStatus |
Modifier and Type | Field and Description |
---|---|
static String |
METRIC_GROUP |
static String |
METRIC_NAME |
Modifier | Constructor and Description |
---|---|
|
ConfluentLicenseValidator() |
protected |
ConfluentLicenseValidator(LicenseManager licenseManager,
ScheduledExecutorService executorService,
Duration checkLicenseInterval) |
Modifier and Type | Method and Description |
---|---|
void |
accept(LicenseChanged licenseChanged) |
protected void |
checkLicense() |
void |
close() |
void |
configure(Map<String,?> configs) |
protected LicenseManager |
createLicenseManager(LicenseConfig licenseConfig) |
protected io.confluent.license.validator.ConfluentLicenseValidator.KafkaLicenseStore |
createLicenseStore(LicenseConfig licenseConfig) |
boolean |
enabled() |
org.apache.kafka.server.license.LicenseTrackingInfoHolder |
get()
Provides LicenseTrackingInfoHolder, which is used to retrieve tracking identifiers from
License to Segment without exposing internal LicenseManager or License.
|
protected long |
getNextCheckIntervalMsAndMaybeLog(long timeRemainingMs) |
boolean |
isLicenseValid() |
protected void |
registerMetric(String metricGroup) |
protected void |
schedulePeriodicValidation() |
void |
start(String componentId) |
protected void |
updateExpiredStatus(ConfluentLicenseValidator.LicenseStatus status,
Date expirationDate) |
protected void |
updateInvalidStatus(String reason) |
protected void |
updateLicenseStatus(ConfluentLicenseValidator.LicenseStatus status) |
public static final String METRIC_GROUP
public static final String METRIC_NAME
public ConfluentLicenseValidator()
protected ConfluentLicenseValidator(LicenseManager licenseManager, ScheduledExecutorService executorService, Duration checkLicenseInterval)
public void configure(Map<String,?> configs)
configure
in interface org.apache.kafka.common.Configurable
public final boolean enabled()
enabled
in interface org.apache.kafka.server.license.LicenseValidator
public void start(String componentId)
start
in interface org.apache.kafka.server.license.LicenseValidator
public boolean isLicenseValid()
isLicenseValid
in interface org.apache.kafka.server.license.LicenseValidator
public void accept(LicenseChanged licenseChanged)
accept
in interface Consumer<LicenseChanged>
public org.apache.kafka.server.license.LicenseTrackingInfoHolder get()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
protected io.confluent.license.validator.ConfluentLicenseValidator.KafkaLicenseStore createLicenseStore(LicenseConfig licenseConfig)
protected LicenseManager createLicenseManager(LicenseConfig licenseConfig)
protected void updateExpiredStatus(ConfluentLicenseValidator.LicenseStatus status, Date expirationDate)
protected void updateInvalidStatus(String reason)
protected void updateLicenseStatus(ConfluentLicenseValidator.LicenseStatus status)
protected void registerMetric(String metricGroup)
protected void schedulePeriodicValidation()
protected void checkLicense()
protected long getNextCheckIntervalMsAndMaybeLog(long timeRemainingMs)