public class IncrementalIdGenerator extends Object implements IdGenerator
| Constructor and Description |
|---|
IncrementalIdGenerator(SchemaRegistry schemaRegistry) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(SchemaRegistryConfig config)
Configure the underlying generator.
|
int |
getMaxId(SchemaValue schema)
Returns the current max id from the generator
|
int |
id(SchemaValue schema)
Provides the id for the schema.
|
void |
init()
Initialize the underlying generator.
|
void |
schemaRegistered(SchemaKey schemaKey,
SchemaValue schemaValue)
Callback method that is invoked when a schema is registered.
|
public IncrementalIdGenerator(SchemaRegistry schemaRegistry)
public int id(SchemaValue schema) throws IdGenerationException
IdGeneratorid in interface IdGeneratorschema - the schema being registered; never nullnullIdGenerationException - exception when id can't be generatedpublic int getMaxId(SchemaValue schema)
IdGeneratorgetMaxId in interface IdGeneratorschema - current schema in the request to Schema Registrynullpublic void configure(SchemaRegistryConfig config)
IdGeneratorconfigure in interface IdGeneratorconfig - Schema Registry Configspublic void init()
throws IdGenerationException
IdGeneratorinit in interface IdGeneratorIdGenerationException - exception when IdGenerator can't be initializedpublic void schemaRegistered(SchemaKey schemaKey, SchemaValue schemaValue)
IdGeneratorschemaRegistered in interface IdGeneratorschemaKey - the registered SchemaKey; never nullschemaValue - the registered SchemaValue; never nullCopyright © 2026 Confluent, Inc.. All rights reserved.