Class ClassLoaderSafeSchemaRegistryClient

  • All Implemented Interfaces:
    io.confluent.kafka.schemaregistry.client.SchemaRegistryClient, io.confluent.kafka.schemaregistry.client.SchemaVersionFetcher

    public class ClassLoaderSafeSchemaRegistryClient
    extends Object
    implements io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
    • Constructor Detail

      • ClassLoaderSafeSchemaRegistryClient

        public ClassLoaderSafeSchemaRegistryClient​(io.confluent.kafka.schemaregistry.client.SchemaRegistryClient delegate,
                                                   ClassLoader classLoader)
    • Method Detail

      • parseSchema

        public Optional<io.confluent.kafka.schemaregistry.ParsedSchema> parseSchema​(String schemaType,
                                                                                    String schemaString,
                                                                                    List<io.confluent.kafka.schemaregistry.client.rest.entities.SchemaReference> references)
        Specified by:
        parseSchema in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
      • 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,
                            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 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 subject,
                            io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema,
                            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
      • 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
      • 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 id)
                                                                     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

        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
      • 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 io.confluent.kafka.schemaregistry.ParsedSchema getSchemaBySubjectAndId​(String subject,
                                                                                      int id)
                                                                               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 id)
                                              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
      • getAllVersionsById

        public Collection<io.confluent.kafka.schemaregistry.client.rest.entities.SubjectVersion> getAllVersionsById​(int id)
                                                                                                             throws IOException,
                                                                                                                    io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
        Specified by:
        getAllVersionsById in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
        Throws:
        IOException
        io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
      • getByVersion

        public io.confluent.kafka.schemaregistry.client.rest.entities.Schema getByVersion​(String subject,
                                                                                          int version,
                                                                                          boolean lookupDeletedSchema)
        Specified by:
        getByVersion in interface io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
        Specified by:
        getByVersion in interface io.confluent.kafka.schemaregistry.client.SchemaVersionFetcher
      • 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 subject,
                              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 subject,
                                         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 subject,
                         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
      • 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