Interface ConfluentLicenseStore

All Known Implementing Classes:
InMemoryLicenseStore, LicenseStore

public interface ConfluentLicenseStore
Interface for Confluent license storage implementations.

This interface supports both simple and advanced license storage:

  • Simple stores (like InMemoryLicenseStore): Single license storage using basic methods
  • Advanced stores (like LicenseStore): Multi-license storage with CommandKey structure

The interface provides default implementations for advanced features that delegate to basic methods, ensuring backward compatibility while enabling rich functionality for stores that support it.

  • Method Details

    • start

      void start()
    • stop

      void stop()
    • licenseScan

      String licenseScan()
    • registerLicense

      void registerLicense(String license)
    • topic

      default String topic()
      LicenseStore falls back to _confluent-command topic if the topic given in the constructor doesn't exist, so this method provides the actual topic used by the license store.
    • getLatestLicenses

      default Map<License.DeploymentScope, String> getLatestLicenses()
      Get all licenses with their corresponding type Simple stores should return an empty map.
      Returns:
      Map of DeploymentScope to license string for advanced stores, empty map for simple stores
    • registerLicense

      default void registerLicense(License.DeploymentScope key, String license)
    • isEventBasedPropagationSupported

      default boolean isEventBasedPropagationSupported()
      Whether this store supports event-based license propagation. When true, the store can notify listeners immediately when new license records arrive, instead of requiring periodic polling.
      Returns:
      true if event-based propagation is supported
    • setOnDataChangeListener

      default void setOnDataChangeListener(Runnable listener)
      Set a listener that is called when new license data arrives in the store. Only supported when isEventBasedPropagationSupported() returns true.
      Parameters:
      listener - the callback to invoke on data change, or null to clear
      Throws:
      UnsupportedOperationException - if event-based propagation is not supported
    • getInMemoryLicenses

      default Map<License.DeploymentScope, String> getInMemoryLicenses()
      Returns the current in-memory license state without reading from the topic. Only supported when isEventBasedPropagationSupported() returns true.
      Returns:
      map of deployment scope to license JWT
      Throws:
      UnsupportedOperationException - if event-based propagation is not supported