Class AbstractSchemaRegistryClient
java.lang.Object
io.confluent.kafka.schemaregistry.validator.AbstractSchemaRegistryClient
- All Implemented Interfaces:
io.confluent.kafka.schemaregistry.client.SchemaRegistryClient,io.confluent.kafka.schemaregistry.client.SchemaVersionFetcher,Closeable,AutoCloseable
- Direct Known Subclasses:
LruSchemaRegistryClient
public abstract class AbstractSchemaRegistryClient
extends Object
implements io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteSchemaVersion(String subject, String version) deleteSubject(String subject) deleteSubject(Map<String, String> requestProperties, String subject) getAllSubjectsById(int i) getAllVersions(String subject) org.apache.avro.SchemagetById(int id) org.apache.avro.SchemagetByID(int id) Deprecated.org.apache.avro.SchemagetBySubjectAndId(String subject, int id) org.apache.avro.SchemagetBySubjectAndID(String subject, int id) Deprecated.getCompatibility(String subject) abstract Stringintabstract intintio.confluent.kafka.schemaregistry.client.SchemaMetadatagetLatestSchemaMetadata(String subject) getMode()io.confluent.kafka.schemaregistry.ParsedSchemagetSchemaById(int i) abstract io.confluent.kafka.schemaregistry.ParsedSchemagetSchemaBySubjectAndId(String s, int i) io.confluent.kafka.schemaregistry.client.SchemaMetadatagetSchemaMetadata(String subject, int version) intgetVersion(String s, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema) intgetVersion(String subject, org.apache.avro.Schema schema) intintintintvoidreset()booleantestCompatibility(String s, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema) booleantestCompatibility(String subject, org.apache.avro.Schema schema) updateCompatibility(String subject, String compatibility) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
close, createAssociation, createOrUpdateAssociation, deleteAssociations, deleteCompatibility, deleteConfig, deleteMode, deleteSchemaVersion, deleteSchemaVersion, deleteSubject, deleteSubject, getAllContexts, getAllSubjects, getAllSubjectsByPrefix, getAllVersions, getAllVersionsById, getAssociationsByResourceId, getAssociationsByResourceName, getAssociationsBySubject, getByVersion, getConfig, getIdWithResponse, getLatestWithMetadata, getSchemaByGuid, getSchemaMetadata, getSchemaRegistryDeployment, getSchemaRegistryServerVersion, getSchemas, getVersion, mutateAssociations, parseSchema, parseSchema, parseSchema, parseSchemaOrElseThrow, register, registerWithResponse, registerWithResponse, setMode, tenant, testCompatibilityVerbose, testCompatibilityVerbose, ticker, updateConfig
-
Constructor Details
-
AbstractSchemaRegistryClient
public AbstractSchemaRegistryClient()
-
-
Method Details
-
register
public int register(String subject, org.apache.avro.Schema schema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
registerin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
register
public int register(String subject, org.apache.avro.Schema schema, int version, int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
registerin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
register
public int register(String s, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
registerin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
register
public int register(String s, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema, int i, int i1) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
registerin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getByID
@Deprecated public org.apache.avro.Schema getByID(int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException Deprecated.- Specified by:
getByIDin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getById
public org.apache.avro.Schema getById(int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getByIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getSchemaById
public io.confluent.kafka.schemaregistry.ParsedSchema getSchemaById(int i) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getSchemaByIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getBySubjectAndID
@Deprecated public org.apache.avro.Schema getBySubjectAndID(String subject, int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException Deprecated.- Specified by:
getBySubjectAndIDin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getBySubjectAndId
public org.apache.avro.Schema getBySubjectAndId(String subject, int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getBySubjectAndIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getSchemaBySubjectAndId
public abstract io.confluent.kafka.schemaregistry.ParsedSchema getSchemaBySubjectAndId(String s, int i) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getSchemaBySubjectAndIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getAllSubjectsById
public Collection<String> getAllSubjectsById(int i) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getAllSubjectsByIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getLatestSchemaMetadata
public io.confluent.kafka.schemaregistry.client.SchemaMetadata getLatestSchemaMetadata(String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getLatestSchemaMetadatain interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getSchemaMetadata
public io.confluent.kafka.schemaregistry.client.SchemaMetadata getSchemaMetadata(String subject, int version) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getSchemaMetadatain interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getVersion
public int getVersion(String subject, org.apache.avro.Schema schema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getVersionin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getVersion
public int getVersion(String s, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getVersionin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getAllVersions
public List<Integer> getAllVersions(String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getAllVersionsin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
testCompatibility
public boolean testCompatibility(String subject, org.apache.avro.Schema schema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
testCompatibilityin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
testCompatibility
public boolean testCompatibility(String s, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
testCompatibilityin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
updateCompatibility
public String updateCompatibility(String subject, String compatibility) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
updateCompatibilityin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getCompatibility
public String getCompatibility(String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getCompatibilityin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
setMode
public String setMode(String mode) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
setModein interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
setMode
public String setMode(String mode, String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
setModein interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getMode
public String getMode() throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException- Specified by:
getModein interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getMode
public String getMode(String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getModein interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getAllSubjects
public Collection<String> getAllSubjects() throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException- Specified by:
getAllSubjectsin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getId
public int getId(String subject, org.apache.avro.Schema schema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getId
public int getId(String s, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getId
public abstract int getId(String s, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema, boolean normalize) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getGuid
public String getGuid(String subject, io.confluent.kafka.schemaregistry.ParsedSchema schema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getGuidin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getGuid
public abstract String getGuid(String subject, io.confluent.kafka.schemaregistry.ParsedSchema schema, boolean normalize) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
getGuidin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
deleteSubject
public List<Integer> deleteSubject(String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
deleteSubjectin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
deleteSubject
public List<Integer> deleteSubject(Map<String, String> requestProperties, String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException- Specified by:
deleteSubjectin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
deleteSchemaVersion
public Integer deleteSchemaVersion(String subject, String version) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException - Specified by:
deleteSchemaVersionin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
deleteSchemaVersion
public Integer deleteSchemaVersion(Map<String, String> requestProperties, String subject, String version) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException- Specified by:
deleteSchemaVersionin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
reset
public void reset()- Specified by:
resetin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient
-