Search in sources :

Example 1 with SchemaStorage

use of org.apache.pulsar.common.protocol.schema.SchemaStorage in project incubator-pulsar by apache.

the class PulsarService method createAndStartSchemaStorage.

private SchemaStorage createAndStartSchemaStorage() throws Exception {
    final Class<?> storageClass = Class.forName(config.getSchemaRegistryStorageClassName());
    Object factoryInstance = storageClass.getDeclaredConstructor().newInstance();
    Method createMethod = storageClass.getMethod("create", PulsarService.class);
    SchemaStorage schemaStorage = (SchemaStorage) createMethod.invoke(factoryInstance, this);
    schemaStorage.start();
    return schemaStorage;
}
Also used : SchemaStorage(org.apache.pulsar.common.protocol.schema.SchemaStorage) Method(java.lang.reflect.Method)

Example 2 with SchemaStorage

use of org.apache.pulsar.common.protocol.schema.SchemaStorage in project pulsar by apache.

the class PulsarService method createAndStartSchemaStorage.

private SchemaStorage createAndStartSchemaStorage() throws Exception {
    final Class<?> storageClass = Class.forName(config.getSchemaRegistryStorageClassName());
    Object factoryInstance = storageClass.getDeclaredConstructor().newInstance();
    Method createMethod = storageClass.getMethod("create", PulsarService.class);
    SchemaStorage schemaStorage = (SchemaStorage) createMethod.invoke(factoryInstance, this);
    schemaStorage.start();
    return schemaStorage;
}
Also used : SchemaStorage(org.apache.pulsar.common.protocol.schema.SchemaStorage) Method(java.lang.reflect.Method)

Example 3 with SchemaStorage

use of org.apache.pulsar.common.protocol.schema.SchemaStorage in project pulsar by yahoo.

the class PulsarService method createAndStartSchemaStorage.

private SchemaStorage createAndStartSchemaStorage() throws Exception {
    final Class<?> storageClass = Class.forName(config.getSchemaRegistryStorageClassName());
    Object factoryInstance = storageClass.getDeclaredConstructor().newInstance();
    Method createMethod = storageClass.getMethod("create", PulsarService.class);
    SchemaStorage schemaStorage = (SchemaStorage) createMethod.invoke(factoryInstance, this);
    schemaStorage.start();
    return schemaStorage;
}
Also used : SchemaStorage(org.apache.pulsar.common.protocol.schema.SchemaStorage) Method(java.lang.reflect.Method)

Aggregations

Method (java.lang.reflect.Method)3 SchemaStorage (org.apache.pulsar.common.protocol.schema.SchemaStorage)3