@ SuppressWarnings ( "unused" ) // called through reflection by RequestServer public MetadataV3 listSchemas ( int version , MetadataV3 docs ) { Map < String , Class < ? extends Schema > > ss = SchemaServer . schemas ( ) ; docs . schemas = new SchemaMetadataV3 [ ss . size ( ) ] ; // NOTE: this will throw an exception if the classname isn't found: int i = 0 ; for ( Class < ? extends Schema > schema_class : ss . values ( ) ) { // No hardwired version! YAY! FINALLY! Schema schema = Schema . newInstance ( schema_class ) ; // get defaults try { Iced impl = ( Iced ) schema . getImplClass ( ) . newInstance ( ) ; schema . fillFromImpl ( impl ) ; } catch ( Exception e ) { // ignore if create fails; this can happen for abstract classes } docs . schemas [ i ++ ] = new SchemaMetadataV3 ( new SchemaMetadata ( schema ) ) ; } return docs ; }
Fetch the metadata for all the Schemas .