Class SchemaIdAndSubjects
java.lang.Object
io.confluent.kafka.schemaregistry.storage.SchemaIdAndSubjects
Kafka schema registry maintains a few in memory indices to facilitate schema lookups. One such
index is the md5 index that maps MD5 -> SchemaIdAndSubjects.
This index is used to do 2 things.
Firstly, to prevent the same schema string from being registered multiple times. So, if the MD5
of the canonicalized schema is present in the registry, we simply return the id. However, the
same schema string can be registered under multiple subjects. And if so, it may be assigned
different version ids per subject that it registers under
-
Constructor Summary
ConstructorsConstructorDescriptionSchemaIdAndSubjects(int id) SchemaIdAndSubjects(int id, Map<String, Integer> subjectsAndVersions) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubjectAndVersion(String subject, int version) booleanintintgetVersion(String subject) inthashCode()booleanhasSubject(String subject) booleanisEmpty()voidtoString()
-
Constructor Details
-
SchemaIdAndSubjects
public SchemaIdAndSubjects(int id) -
SchemaIdAndSubjects
-
-
Method Details
-
addSubjectAndVersion
-
hasSubject
-
getVersion
-
getSchemaId
public int getSchemaId() -
isEmpty
public boolean isEmpty() -
findAny
-
allSubjects
-
allSubjectVersions
-
removeIf
-
equals
-
hashCode
public int hashCode() -
toString
-