Class SimpleSchemaRegistry
java.lang.Object
ai.badmonkey.agentspaces.space.local.SimpleSchemaRegistry
- All Implemented Interfaces:
SchemaRegistry
The default schema registry: names a type
<fully.qualified.Name>#v1.
Writer/reader schema evolution (spec ยง14) will refine this; the name format is
already versioned so that refinement stays compatible.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResolves a schema name back to a registered class, when this JVM knows it.Registers an entry type and returns its schema name.schemaNameOf(Class<?> entryType) Returns the schema name of a registered type.
-
Constructor Details
-
SimpleSchemaRegistry
public SimpleSchemaRegistry()
-
-
Method Details
-
register
Description copied from interface:SchemaRegistryRegisters an entry type and returns its schema name. Idempotent.- Specified by:
registerin interfaceSchemaRegistry- Parameters:
entryType- the entry class- Returns:
- the schema name
-
schemaNameOf
Description copied from interface:SchemaRegistryReturns the schema name of a registered type.- Specified by:
schemaNameOfin interfaceSchemaRegistry- Parameters:
entryType- the entry class- Returns:
- the schema name
-
classFor
Description copied from interface:SchemaRegistryResolves a schema name back to a registered class, when this JVM knows it.- Specified by:
classForin interfaceSchemaRegistry- Parameters:
schemaName- the schema name- Returns:
- the class, or empty when unknown here
-