Class TrialOnlyLicenseManager

java.lang.Object
io.confluent.license.TrialOnlyLicenseManager
All Implemented Interfaces:
AddOnLicenseManager

public class TrialOnlyLicenseManager extends Object implements AddOnLicenseManager
License manager for managing only trial licenses in Confluent Platform.

The manager uses a delegate pattern internally, delegating most operations to a LicenseManager configured specifically for trial only license management with PRIMARY purpose.

  • Constructor Details

    • TrialOnlyLicenseManager

      public TrialOnlyLicenseManager(String topic, Map<String,Object> producerConfig, Map<String,Object> consumerConfig, Map<String,Object> topicConfig, String licenseGuid)
      Create a new trial only license manager that uses the specified topic for trial licenses, with configurations for an admin client, producer, and consumer to create, write to, and read from that topic in a Kafka cluster.

      The trial only license store will be automatically started as part of construction.

      Multiple components can use this manager with different licenseGuid values to maintain separate trial licenses in the same Kafka topic. The GUID acts as a partition key for license isolation.

      Parameters:
      topic - the name of the topic where only trial licenses are persisted; may not be null
      producerConfig - the configuration for the producer used to write to the license topic; may not be null
      consumerConfig - the configuration for the consumer used to read from the license topic; may not be null
      topicConfig - the configuration for the admin client to create the license topic if required; may not be null
      licenseGuid - the unique identifier for the license; may not be null
    • TrialOnlyLicenseManager

      public TrialOnlyLicenseManager(ConfluentLicenseStore store, org.apache.kafka.common.utils.Time time)
      Create a new trial only license manager for testing purposes using a pre-configured license store and time source.

      This constructor is intended for unit testing and allows injection of mock dependencies to control behavior in tests.

      Parameters:
      store - the pre-configured license store to use; may not be null
      time - the time source to use for license validation; may not be null
  • Method Details