Interface SchemaRegistryClient
- All Superinterfaces:
AutoCloseable,Closeable,SchemaVersionFetcher
- All Known Implementing Classes:
CachedSchemaRegistryClient,MockSchemaRegistryClient
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()default AssociationResponsedefault AssociationResponsedefault voiddeleteAssociations(String resourceId, String resourceType, List<String> associationTypes, boolean cascadeLifecycle) default voiddeleteCompatibility(String subject) default voiddeleteConfig(String subject) default voiddeleteMode(String subject) default IntegerdeleteSchemaVersion(String subject, String version) default IntegerdeleteSchemaVersion(String subject, String version, boolean isPermanent) default Integerdefault IntegerdeleteSchemaVersion(Map<String, String> requestProperties, String subject, String version, boolean isPermanent) deleteSubject(String subject) deleteSubject(String subject, boolean isPermanent) deleteSubject(Map<String, String> requestProperties, String subject) deleteSubject(Map<String, String> requestProperties, String subject, boolean isPermanent) default Collection<String>default Collection<String>getAllSubjects(boolean lookupDeletedSubject) getAllSubjectsById(int id) default Collection<String>getAllSubjectsByPrefix(String subjectPrefix) getAllVersions(String subject) getAllVersions(String subject, boolean lookupDeletedSchema) default Collection<SubjectVersion>getAllVersionsById(int id) default List<Association>getAssociationsByResourceId(String resourceId, String resourceType, List<String> associationTypes, String lifecycle, int offset, int limit) default List<Association>getAssociationsBySubject(String subject, String resourceType, List<String> associationTypes, String lifecycle, int offset, int limit) default org.apache.avro.SchemagetById(int id) Deprecated.default org.apache.avro.SchemagetByID(int id) Deprecated.usegetSchemaById(int)insteaddefault org.apache.avro.SchemagetBySubjectAndId(String subject, int id) Deprecated.usegetSchemaBySubjectAndId(String, int)insteaddefault org.apache.avro.SchemagetBySubjectAndID(String subject, int id) Deprecated.usegetSchemaBySubjectAndId(String, int)insteaddefault SchemagetByVersion(String subject, int version, boolean lookupDeletedSchema) default StringgetCompatibility(String subject) default Configdefault StringgetGuid(String subject, ParsedSchema schema) default StringgetGuid(String subject, ParsedSchema schema, boolean normalize) intgetId(String subject, ParsedSchema schema) default intgetId(String subject, ParsedSchema schema, boolean normalize) default intDeprecated.default RegisterSchemaResponsegetIdWithResponse(String subject, ParsedSchema schema, boolean normalize) getLatestSchemaMetadata(String subject) default SchemaMetadatagetLatestWithMetadata(String subject, Map<String, String> metadata, boolean lookupDeletedSchema) getMode()default ParsedSchemagetSchemaByGuid(String guid, String format) getSchemaById(int id) getSchemaBySubjectAndId(String subject, int id) getSchemaMetadata(String subject, int version) default SchemaMetadatagetSchemaMetadata(String subject, int version, boolean lookupDeletedSchema) default SchemaRegistryDeploymentdefault SchemaRegistryServerVersiondefault List<ParsedSchema>getSchemas(String subjectPrefix, boolean lookupDeletedSchema, boolean latestOnly) intgetVersion(String subject, ParsedSchema schema) default intgetVersion(String subject, ParsedSchema schema, boolean normalize) default intgetVersion(String subject, org.apache.avro.Schema schema) Deprecated.default Optional<ParsedSchema>parseSchema(Schema schema) parseSchema(String schemaType, String schemaString, List<SchemaReference> references) default Optional<ParsedSchema>parseSchema(String schemaType, String schemaString, List<SchemaReference> references, Metadata metadata, RuleSet ruleSet) default ParsedSchemaparseSchemaOrElseThrow(Schema schema) intregister(String subject, ParsedSchema schema) default intregister(String subject, ParsedSchema schema, boolean normalize) intregister(String subject, ParsedSchema schema, int version, int id) default intDeprecated.useregister(String, ParsedSchema)instead; for example, you can convert aSchemainto aParsedSchemavianew AvroSchema(schema)default intDeprecated.useregister(String, ParsedSchema, int, int)instead; for example, you can convert aSchemainto aParsedSchemavianew AvroSchema(schema)default RegisterSchemaResponseregisterWithResponse(String subject, ParsedSchema schema, boolean normalize) default RegisterSchemaResponseregisterWithResponse(String subject, ParsedSchema schema, boolean normalize, boolean propagateSchemaTags) voidreset()default Stringdefault Stringtenant()booleantestCompatibility(String subject, ParsedSchema schema) default booleantestCompatibility(String subject, org.apache.avro.Schema schema) Deprecated.testCompatibilityVerbose(String subject, ParsedSchema schema) testCompatibilityVerbose(String subject, ParsedSchema schema, boolean normalize) default com.google.common.base.Tickerticker()default StringupdateCompatibility(String subject, String compatibility) default ConfigupdateConfig(String subject, Config config)
-
Method Details
-
tenant
- Specified by:
tenantin interfaceSchemaVersionFetcher
-
ticker
default com.google.common.base.Ticker ticker() -
parseSchema
Optional<ParsedSchema> parseSchema(String schemaType, String schemaString, List<SchemaReference> references) -
parseSchema
default Optional<ParsedSchema> parseSchema(String schemaType, String schemaString, List<SchemaReference> references, Metadata metadata, RuleSet ruleSet) -
parseSchema
-
parseSchemaOrElseThrow
- Throws:
IOException
-
register
@Deprecated default int register(String subject, org.apache.avro.Schema schema) throws IOException, RestClientException Deprecated.useregister(String, ParsedSchema)instead; for example, you can convert aSchemainto aParsedSchemavianew AvroSchema(schema)- Throws:
IOExceptionRestClientException
-
register
- Throws:
IOExceptionRestClientException
-
register
default int register(String subject, ParsedSchema schema, boolean normalize) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
register
@Deprecated default int register(String subject, org.apache.avro.Schema schema, int version, int id) throws IOException, RestClientException Deprecated.useregister(String, ParsedSchema, int, int)instead; for example, you can convert aSchemainto aParsedSchemavianew AvroSchema(schema)- Throws:
IOExceptionRestClientException
-
register
int register(String subject, ParsedSchema schema, int version, int id) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
registerWithResponse
default RegisterSchemaResponse registerWithResponse(String subject, ParsedSchema schema, boolean normalize) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
registerWithResponse
default RegisterSchemaResponse registerWithResponse(String subject, ParsedSchema schema, boolean normalize, boolean propagateSchemaTags) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getByID
Deprecated.usegetSchemaById(int)instead- Throws:
IOExceptionRestClientException
-
getById
Deprecated.usegetSchemaById(int)instead- Throws:
IOExceptionRestClientException
-
getSchemaById
- Throws:
IOExceptionRestClientException
-
getBySubjectAndID
@Deprecated default org.apache.avro.Schema getBySubjectAndID(String subject, int id) throws IOException, RestClientException Deprecated.usegetSchemaBySubjectAndId(String, int)instead- Throws:
IOExceptionRestClientException
-
getBySubjectAndId
@Deprecated default org.apache.avro.Schema getBySubjectAndId(String subject, int id) throws IOException, RestClientException Deprecated.usegetSchemaBySubjectAndId(String, int)instead- Throws:
IOExceptionRestClientException
-
getSchemaBySubjectAndId
ParsedSchema getSchemaBySubjectAndId(String subject, int id) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getSchemaByGuid
default ParsedSchema getSchemaByGuid(String guid, String format) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getSchemas
default List<ParsedSchema> getSchemas(String subjectPrefix, boolean lookupDeletedSchema, boolean latestOnly) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getAllSubjectsById
- Throws:
IOExceptionRestClientException
-
getAllVersionsById
default Collection<SubjectVersion> getAllVersionsById(int id) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getByVersion
- Specified by:
getByVersionin interfaceSchemaVersionFetcher
-
getLatestSchemaMetadata
- Throws:
IOExceptionRestClientException
-
getSchemaMetadata
SchemaMetadata getSchemaMetadata(String subject, int version) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getSchemaMetadata
default SchemaMetadata getSchemaMetadata(String subject, int version, boolean lookupDeletedSchema) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getLatestWithMetadata
default SchemaMetadata getLatestWithMetadata(String subject, Map<String, String> metadata, boolean lookupDeletedSchema) throws IOException, RestClientException- Throws:
IOExceptionRestClientException
-
getVersion
@Deprecated default int getVersion(String subject, org.apache.avro.Schema schema) throws IOException, RestClientException Deprecated.- Throws:
IOExceptionRestClientException
-
getVersion
- Throws:
IOExceptionRestClientException
-
getVersion
default int getVersion(String subject, ParsedSchema schema, boolean normalize) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getAllVersions
- Throws:
IOExceptionRestClientException
-
getAllVersions
default List<Integer> getAllVersions(String subject, boolean lookupDeletedSchema) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
testCompatibility
@Deprecated default boolean testCompatibility(String subject, org.apache.avro.Schema schema) throws IOException, RestClientException Deprecated.- Throws:
IOExceptionRestClientException
-
testCompatibility
boolean testCompatibility(String subject, ParsedSchema schema) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
testCompatibilityVerbose
default List<String> testCompatibilityVerbose(String subject, ParsedSchema schema) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
testCompatibilityVerbose
default List<String> testCompatibilityVerbose(String subject, ParsedSchema schema, boolean normalize) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
updateCompatibility
default String updateCompatibility(String subject, String compatibility) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getCompatibility
- Throws:
IOExceptionRestClientException
-
deleteCompatibility
- Throws:
IOExceptionRestClientException
-
updateConfig
- Throws:
IOExceptionRestClientException
-
getConfig
- Throws:
IOExceptionRestClientException
-
deleteConfig
- Throws:
IOExceptionRestClientException
-
setMode
- Throws:
IOExceptionRestClientException
-
setMode
- Throws:
IOExceptionRestClientException
-
setMode
default String setMode(String mode, String subject, boolean force) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getMode
- Throws:
IOExceptionRestClientException
-
getMode
- Throws:
IOExceptionRestClientException
-
deleteMode
- Throws:
IOExceptionRestClientException
-
getAllContexts
- Throws:
IOExceptionRestClientException
-
getSchemaRegistryDeployment
default SchemaRegistryDeployment getSchemaRegistryDeployment() throws IOException, RestClientException- Throws:
IOExceptionRestClientException
-
getSchemaRegistryServerVersion
default SchemaRegistryServerVersion getSchemaRegistryServerVersion() throws IOException, RestClientException- Throws:
IOExceptionRestClientException
-
getAllSubjects
- Throws:
IOExceptionRestClientException
-
getAllSubjects
default Collection<String> getAllSubjects(boolean lookupDeletedSubject) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getAllSubjectsByPrefix
default Collection<String> getAllSubjectsByPrefix(String subjectPrefix) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getId
@Deprecated default int getId(String subject, org.apache.avro.Schema schema) throws IOException, RestClientException Deprecated.- Throws:
IOExceptionRestClientException
-
getId
- Throws:
IOExceptionRestClientException
-
getId
default int getId(String subject, ParsedSchema schema, boolean normalize) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getGuid
- Throws:
IOExceptionRestClientException
-
getGuid
default String getGuid(String subject, ParsedSchema schema, boolean normalize) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getIdWithResponse
default RegisterSchemaResponse getIdWithResponse(String subject, ParsedSchema schema, boolean normalize) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
deleteSubject
- Throws:
IOExceptionRestClientException
-
deleteSubject
default List<Integer> deleteSubject(String subject, boolean isPermanent) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
deleteSubject
default List<Integer> deleteSubject(Map<String, String> requestProperties, String subject) throws IOException, RestClientException- Throws:
IOExceptionRestClientException
-
deleteSubject
default List<Integer> deleteSubject(Map<String, String> requestProperties, String subject, boolean isPermanent) throws IOException, RestClientException- Throws:
IOExceptionRestClientException
-
deleteSchemaVersion
default Integer deleteSchemaVersion(String subject, String version) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
deleteSchemaVersion
default Integer deleteSchemaVersion(String subject, String version, boolean isPermanent) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
deleteSchemaVersion
default Integer deleteSchemaVersion(Map<String, String> requestProperties, String subject, String version) throws IOException, RestClientException- Throws:
IOExceptionRestClientException
-
deleteSchemaVersion
default Integer deleteSchemaVersion(Map<String, String> requestProperties, String subject, String version, boolean isPermanent) throws IOException, RestClientException- Throws:
IOExceptionRestClientException
-
reset
void reset() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
createAssociation
default AssociationResponse createAssociation(AssociationCreateOrUpdateRequest request) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
createOrUpdateAssociation
default AssociationResponse createOrUpdateAssociation(AssociationCreateOrUpdateRequest request) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getAssociationsBySubject
default List<Association> getAssociationsBySubject(String subject, String resourceType, List<String> associationTypes, String lifecycle, int offset, int limit) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getAssociationsByResourceId
default List<Association> getAssociationsByResourceId(String resourceId, String resourceType, List<String> associationTypes, String lifecycle, int offset, int limit) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
deleteAssociations
default void deleteAssociations(String resourceId, String resourceType, List<String> associationTypes, boolean cascadeLifecycle) throws IOException, RestClientException - Throws:
IOExceptionRestClientException
-
getSchemaById(int)instead