Class CachingRegistryClient
java.lang.Object
org.springframework.cloud.stream.schema.registry.client.CachingRegistryClient
- All Implemented Interfaces:
SchemaRegistryClient
- Author:
- Vinicius Carvalho
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfetch(int id) Retrieves a schema by its identifier.fetch(SchemaReference schemaReference) Retrieves a schema by its reference (subject and version).Registers a schema with the remote repository returning the unique identifier associated with this schema.
-
Constructor Details
-
CachingRegistryClient
-
-
Method Details
-
register
Description copied from interface:SchemaRegistryClientRegisters a schema with the remote repository returning the unique identifier associated with this schema.- Specified by:
registerin interfaceSchemaRegistryClient- Parameters:
subject- the full name of the schemaformat- format of the schemaschema- string representation of the schema- Returns:
- a
SchemaRegistrationResponserepresenting 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:SchemaRegistryClientRetrieves a schema by its reference (subject and version).- Specified by:
fetchin interfaceSchemaRegistryClient- Parameters:
schemaReference- aSchemaReferenceused 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:SchemaRegistryClientRetrieves a schema by its identifier.- Specified by:
fetchin interfaceSchemaRegistryClient- Parameters:
id- the id of the target schema.- Returns:
- schema
-