Package io.apicurio.registry.resolver
Class DefaultSchemaResolver<S,T>
- java.lang.Object
-
- io.apicurio.registry.resolver.AbstractSchemaResolver<S,T>
-
- io.apicurio.registry.resolver.DefaultSchemaResolver<S,T>
-
- All Implemented Interfaces:
SchemaResolver<S,T>,Closeable,AutoCloseable
public class DefaultSchemaResolver<S,T> extends AbstractSchemaResolver<S,T>
Default implementation ofSchemaResolver- Author:
- Fabian Martinez, Jakub Senko m@jsenko.net
-
-
Field Summary
-
Fields inherited from class io.apicurio.registry.resolver.AbstractSchemaResolver
artifactResolverStrategy, authClient, client, config, explicitArtifactGroupId, explicitArtifactId, explicitArtifactVersion, schemaCache, schemaParser
-
-
Constructor Summary
Constructors Constructor Description DefaultSchemaResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Map<String,?> configs, SchemaParser<S,T> schemaParser)Configure, if supported.voidreset()Hard reset cacheSchemaLookupResult<S>resolveSchema(Record<T> data)Used to register or to lookup a schema in the registrySchemaLookupResult<S>resolveSchemaByArtifactReference(ArtifactReference reference)The schema resolver may use different pieces of information from theArtifactReferenceImpldepending on the configuration of the schema resolver.protected SchemaLookupResult<S>resolveSchemaByContentHash(String contentHash)protected SchemaLookupResult<S>resolveSchemaByContentId(long contentId)-
Methods inherited from class io.apicurio.registry.resolver.AbstractSchemaResolver
close, getSchemaParser, loadFromArtifactMetaData, loadFromArtifactMetaData, resolveArtifactId, resolveArtifactReference, resolveReferences, resolveSchemaByGlobalId, setArtifactResolverStrategy, setClient
-
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:SchemaResolverHard reset cache- Specified by:
resetin interfaceSchemaResolver<S,T>- Overrides:
resetin classAbstractSchemaResolver<S,T>- See Also:
AbstractSchemaResolver.reset()
-
configure
public void configure(Map<String,?> configs, SchemaParser<S,T> schemaParser)
Description copied from interface:SchemaResolverConfigure, if supported.- Specified by:
configurein interfaceSchemaResolver<S,T>- Overrides:
configurein classAbstractSchemaResolver<S,T>- Parameters:
configs- the configs- See Also:
AbstractSchemaResolver.configure(java.util.Map, io.apicurio.registry.resolver.SchemaParser)
-
resolveSchema
public SchemaLookupResult<S> resolveSchema(Record<T> data)
Description copied from interface:SchemaResolverUsed to register or to lookup a schema in the registry- Parameters:
data- , record containing metadata about it that can be used by the resolver to lookup a schema in the registry- Returns:
- SchemaLookupResult
- See Also:
SchemaResolver.resolveSchema(io.apicurio.registry.resolver.data.Record)
-
resolveSchemaByArtifactReference
public SchemaLookupResult<S> resolveSchemaByArtifactReference(ArtifactReference reference)
Description copied from interface:SchemaResolverThe schema resolver may use different pieces of information from theArtifactReferenceImpldepending on the configuration of the schema resolver.- Returns:
- SchemaLookupResult
- See Also:
(io.apicurio.registry.resolver.strategy.ArtifactReferenceImpl)
-
resolveSchemaByContentId
protected SchemaLookupResult<S> resolveSchemaByContentId(long contentId)
-
resolveSchemaByContentHash
protected SchemaLookupResult<S> resolveSchemaByContentHash(String contentHash)
-
-