Class CachingRegistryClient

java.lang.Object
org.springframework.cloud.stream.schema.registry.client.CachingRegistryClient
All Implemented Interfaces:
SchemaRegistryClient

public class CachingRegistryClient extends Object implements SchemaRegistryClient
Author:
Vinicius Carvalho
  • Constructor Details

  • Method Details

    • register

      public SchemaRegistrationResponse register(String subject, String format, String schema)
      Description copied from interface: SchemaRegistryClient
      Registers a schema with the remote repository returning the unique identifier associated with this schema.
      Specified by:
      register in interface SchemaRegistryClient
      Parameters:
      subject - the full name of the schema
      format - format of the schema
      schema - string representation of the schema
      Returns:
      a SchemaRegistrationResponse representing the result of the operation
    • fetch

      @Cacheable(cacheNames="org.springframework.cloud.stream.schema.registry.client.schemaByReferenceCache") public String fetch(SchemaReference schemaReference)
      Description copied from interface: SchemaRegistryClient
      Retrieves a schema by its reference (subject and version).
      Specified by:
      fetch in interface SchemaRegistryClient
      Parameters:
      schemaReference - a SchemaReference used to identify the target schema.
      Returns:
      schema
    • fetch

      @Cacheable(cacheNames="org.springframework.cloud.stream.schema.registry.client.schemaByIdCache") public String fetch(int id)
      Description copied from interface: SchemaRegistryClient
      Retrieves a schema by its identifier.
      Specified by:
      fetch in interface SchemaRegistryClient
      Parameters:
      id - the id of the target schema.
      Returns:
      schema