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 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:
      register in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      register in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      register in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      register in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getByID in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getById in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getSchemaById in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getBySubjectAndID in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getBySubjectAndId in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getSchemaBySubjectAndId in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getAllSubjectsById in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getLatestSchemaMetadata in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getSchemaMetadata in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getVersion in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getVersion in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getAllVersions in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      testCompatibility in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      testCompatibility in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      updateCompatibility in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getCompatibility in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      setMode in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      setMode in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
    • getMode

      public String getMode() throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
      Specified by:
      getMode in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getMode in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
    • getAllSubjects

      public Collection<String> getAllSubjects() throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
      Specified by:
      getAllSubjects in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getId in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getId in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getId in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getGuid in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      getGuid in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      deleteSubject in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      deleteSubject in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      deleteSchemaVersion in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.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:
      deleteSchemaVersion in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      Throws:
      IOException
      io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
    • reset

      public void reset()
      Specified by:
      reset in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient