public class AddOnLicenseManagerImpl extends Object implements AddOnLicenseManager
| Constructor and Description |
|---|
AddOnLicenseManagerImpl(LicenseStore store,
LicenseManagerPurpose purpose,
String licenseString,
org.apache.kafka.common.utils.Time time) |
AddOnLicenseManagerImpl(String topic,
Map<String,Object> producerConfig,
Map<String,Object> consumerConfig,
Map<String,Object> topicConfig,
LicenseManagerPurpose purpose,
String licenseString)
Create a new license manager that uses the specified topic for licenses, configurations for an
admin client, producer, and consumer to create, write to, and read from that topic in a primary
Kafka cluster.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addListener(Consumer<LicenseChanged> listener) |
License |
registerOrValidateAddOnLicense(String license) |
void |
start() |
void |
stop() |
public AddOnLicenseManagerImpl(String topic, Map<String,Object> producerConfig, Map<String,Object> consumerConfig, Map<String,Object> topicConfig, LicenseManagerPurpose purpose, String licenseString)
topic - the name of the topic where licenses are persisted; may not be nullproducerConfig - the configuration for the producer used to write to the license topic;
may not be nullconsumerConfig - the configuration for the consumer used to read from the license topic;
may not be nulltopicConfig - the configuration for the admin client to create the license topic if
required; may not be nullpurpose - the purpose of licenselicenseString - the license string, can be null if you want license to be fetched from
kafkapublic AddOnLicenseManagerImpl(LicenseStore store, LicenseManagerPurpose purpose, String licenseString, org.apache.kafka.common.utils.Time time)
public License registerOrValidateAddOnLicense(String license) throws InvalidLicenseException
registerOrValidateAddOnLicense in interface AddOnLicenseManagerInvalidLicenseExceptionpublic void start()
start in interface AddOnLicenseManagerpublic void stop()
stop in interface AddOnLicenseManagerpublic boolean addListener(Consumer<LicenseChanged> listener)
addListener in interface AddOnLicenseManager