public class LicenseStore extends Object implements ConfluentLicenseStore
| Modifier and Type | Class and Description |
|---|---|
static class |
LicenseStore.ConsumeCallback |
static class |
LicenseStore.LicenseKeySerde |
static class |
LicenseStore.LicenseMessageSerde |
| Modifier and Type | Field and Description |
|---|---|
protected LicenseKafkaBasedLog<io.confluent.command.record.Command.CommandKey,io.confluent.command.record.Command.CommandMessage> |
licenseLog |
static String |
MIN_INSYNC_REPLICAS_CONFIG |
static long |
READ_TO_END_TIMEOUT_MS |
static String |
REPLICATION_FACTOR_CONFIG |
| Modifier | Constructor and Description |
|---|---|
|
LicenseStore(io.confluent.command.record.Command.CommandKey commandKey,
String topic,
ConcurrentHashMap<io.confluent.command.record.Command.CommandKey,String> latestLicenses,
LicenseKafkaBasedLog<io.confluent.command.record.Command.CommandKey,io.confluent.command.record.Command.CommandMessage> licenseLog,
org.apache.kafka.common.utils.Time time) |
|
LicenseStore(List<io.confluent.command.record.Command.CommandKey> commandKeys,
String topic,
ConcurrentHashMap<io.confluent.command.record.Command.CommandKey,String> latestLicenses,
LicenseKafkaBasedLog<io.confluent.command.record.Command.CommandKey,io.confluent.command.record.Command.CommandMessage> licenseLog,
org.apache.kafka.common.utils.Time time) |
|
LicenseStore(String topic,
Map<String,Object> producerConfig,
Map<String,Object> consumerConfig,
Map<String,Object> topicConfig) |
|
LicenseStore(String topic,
Map<String,Object> producerConfig,
Map<String,Object> consumerConfig,
Map<String,Object> topicConfig,
Duration topicCreateTimeout,
Duration retryBackoffMinMs,
Duration retryBackoffMaxMs,
org.apache.kafka.common.utils.Time time) |
|
LicenseStore(String topic,
Map<String,Object> producerConfig,
Map<String,Object> consumerConfig,
Map<String,Object> topicConfig,
Duration topicCreateTimeout,
Duration retryBackoffMinMs,
Duration retryBackoffMaxMs,
org.apache.kafka.common.utils.Time time,
List<io.confluent.command.record.Command.CommandKey> commandKeys) |
|
LicenseStore(String topic,
Map<String,Object> producerConfig,
Map<String,Object> consumerConfig,
Map<String,Object> topicConfig,
List<io.confluent.command.record.Command.CommandKey> commandKeys) |
protected |
LicenseStore(String topic,
Map<String,Object> producerConfig,
Map<String,Object> consumerConfig,
Map<String,Object> topicConfig,
org.apache.kafka.common.utils.Time time) |
protected |
LicenseStore(String topic,
Map<String,Object> producerConfig,
Map<String,Object> consumerConfig,
Map<String,Object> topicConfig,
org.apache.kafka.common.utils.Time time,
List<io.confluent.command.record.Command.CommandKey> commandKeys) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createConfluentLicenseTopic(org.apache.kafka.clients.admin.AdminClient admin,
String finalTopic,
org.apache.kafka.clients.admin.NewTopic topicDescription) |
Map<License.DeploymentScope,String> |
getLatestLicenses()
Reads the license store
LicenseStore and returns the latest licenses per License.DeploymentScope. |
String |
licenseScan()
Returns a single license only when
LicenseStore is configured with exactly one Command.CommandKey. |
void |
registerLicense(License.DeploymentScope deploymentScope,
String license)
Registers a license JWT for the given
License.DeploymentScope. |
void |
registerLicense(String license)
Supports single-license
LicenseStore only. |
void |
registerLicense(String license,
org.apache.kafka.clients.producer.Callback callback)
Supports single-license
LicenseStore only. |
void |
start() |
protected void |
startLog() |
void |
stop() |
protected void |
stopLog() |
String |
topic() |
protected void |
verifyConfluentLicenseTopicMetadata(org.apache.kafka.clients.consumer.Consumer<io.confluent.command.record.Command.CommandKey,io.confluent.command.record.Command.CommandMessage> consumer) |
public static final String REPLICATION_FACTOR_CONFIG
public static final String MIN_INSYNC_REPLICAS_CONFIG
public static final long READ_TO_END_TIMEOUT_MS
protected final LicenseKafkaBasedLog<io.confluent.command.record.Command.CommandKey,io.confluent.command.record.Command.CommandMessage> licenseLog
public LicenseStore(String topic, Map<String,Object> producerConfig, Map<String,Object> consumerConfig, Map<String,Object> topicConfig)
public LicenseStore(String topic, Map<String,Object> producerConfig, Map<String,Object> consumerConfig, Map<String,Object> topicConfig, List<io.confluent.command.record.Command.CommandKey> commandKeys)
protected LicenseStore(String topic, Map<String,Object> producerConfig, Map<String,Object> consumerConfig, Map<String,Object> topicConfig, org.apache.kafka.common.utils.Time time)
protected LicenseStore(String topic, Map<String,Object> producerConfig, Map<String,Object> consumerConfig, Map<String,Object> topicConfig, org.apache.kafka.common.utils.Time time, List<io.confluent.command.record.Command.CommandKey> commandKeys)
public LicenseStore(String topic, Map<String,Object> producerConfig, Map<String,Object> consumerConfig, Map<String,Object> topicConfig, Duration topicCreateTimeout, Duration retryBackoffMinMs, Duration retryBackoffMaxMs, org.apache.kafka.common.utils.Time time)
public LicenseStore(String topic, Map<String,Object> producerConfig, Map<String,Object> consumerConfig, Map<String,Object> topicConfig, Duration topicCreateTimeout, Duration retryBackoffMinMs, Duration retryBackoffMaxMs, org.apache.kafka.common.utils.Time time, List<io.confluent.command.record.Command.CommandKey> commandKeys)
public LicenseStore(List<io.confluent.command.record.Command.CommandKey> commandKeys, String topic, ConcurrentHashMap<io.confluent.command.record.Command.CommandKey,String> latestLicenses, LicenseKafkaBasedLog<io.confluent.command.record.Command.CommandKey,io.confluent.command.record.Command.CommandMessage> licenseLog, org.apache.kafka.common.utils.Time time)
public LicenseStore(io.confluent.command.record.Command.CommandKey commandKey,
String topic,
ConcurrentHashMap<io.confluent.command.record.Command.CommandKey,String> latestLicenses,
LicenseKafkaBasedLog<io.confluent.command.record.Command.CommandKey,io.confluent.command.record.Command.CommandMessage> licenseLog,
org.apache.kafka.common.utils.Time time)
public void start()
start in interface ConfluentLicenseStorepublic void stop()
stop in interface ConfluentLicenseStoreprotected void startLog()
protected void stopLog()
public String licenseScan()
LicenseStore is configured with exactly one Command.CommandKey.
When multiple license types are supported, this method returns null.
Use getLatestLicenses() to retrieve all licenses by License.DeploymentScope.
For multi-license stores, use getLatestLicenses() instead.licenseScan in interface ConfluentLicenseStorepublic Map<License.DeploymentScope,String> getLatestLicenses()
LicenseStore and returns the latest licenses per License.DeploymentScope.
Only keys in RECORDS_KEY_ID_MAPPING are included; others are ignored.getLatestLicenses in interface ConfluentLicenseStoreIllegalStateException - if reading the log fails or times outpublic void registerLicense(String license)
LicenseStore only. For multi-license configurations use
#registerLicense(DeploymentScope, String).
Use #registerLicense(DeploymentScope, String) for multi-license stores.registerLicense in interface ConfluentLicenseStorepublic void registerLicense(String license, org.apache.kafka.clients.producer.Callback callback)
LicenseStore only.
Use #registerLicense(DeploymentScope, String) for multi-license configurations.public void registerLicense(License.DeploymentScope deploymentScope, String license)
License.DeploymentScope. Only scopes present in
LICENSE_SCOPE_TO_KEY_MAPPING are supported.registerLicense in interface ConfluentLicenseStoredeploymentScope - target scope (e.g. CP, CP_FOR_CC)license - JWT to writeprotected final void createConfluentLicenseTopic(org.apache.kafka.clients.admin.AdminClient admin,
String finalTopic,
org.apache.kafka.clients.admin.NewTopic topicDescription)
protected final void verifyConfluentLicenseTopicMetadata(org.apache.kafka.clients.consumer.Consumer<io.confluent.command.record.Command.CommandKey,io.confluent.command.record.Command.CommandMessage> consumer)
public String topic()