Class MockSchemaRegistry

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.apache.nifi.serialization.record.MockSchemaRegistry
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.controller.ControllerService, SchemaRegistry

public class MockSchemaRegistry extends org.apache.nifi.controller.AbstractControllerService implements SchemaRegistry
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final ConcurrentMap<Tuple<Long,Integer>,org.apache.nifi.serialization.record.RecordSchema>
     
    private final ConcurrentMap<Triple<String,String,Integer>,org.apache.nifi.serialization.record.RecordSchema>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSchema(String name, Integer version, org.apache.nifi.serialization.record.RecordSchema schema)
     
    void
    addSchema(String name, String branch, Integer version, org.apache.nifi.serialization.record.RecordSchema schema)
     
    void
    addSchema(String name, String branch, org.apache.nifi.serialization.record.RecordSchema schema)
     
    void
    addSchema(String name, org.apache.nifi.serialization.record.RecordSchema schema)
     
     
    org.apache.nifi.serialization.record.RecordSchema
    retrieveSchema(org.apache.nifi.serialization.record.SchemaIdentifier schemaIdentifier)
     
    private org.apache.nifi.serialization.record.RecordSchema
    retrieveSchemaByIdAndVersion(org.apache.nifi.serialization.record.SchemaIdentifier schemaIdentifier)
     
    (package private) org.apache.nifi.serialization.record.RecordSchema
    retrieveSchemaByName(org.apache.nifi.serialization.record.SchemaIdentifier schemaIdentifier)
     

    Methods inherited from class org.apache.nifi.controller.AbstractControllerService

    abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabled

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, toString, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.controller.ControllerService

    initialize, isStateful, migrateProperties
  • Field Details

  • Constructor Details

    • MockSchemaRegistry

      public MockSchemaRegistry()
  • Method Details

    • addSchema

      public void addSchema(String name, org.apache.nifi.serialization.record.RecordSchema schema)
    • addSchema

      public void addSchema(String name, String branch, org.apache.nifi.serialization.record.RecordSchema schema)
    • addSchema

      public void addSchema(String name, Integer version, org.apache.nifi.serialization.record.RecordSchema schema)
    • addSchema

      public void addSchema(String name, String branch, Integer version, org.apache.nifi.serialization.record.RecordSchema schema)
    • retrieveSchemaByName

      org.apache.nifi.serialization.record.RecordSchema retrieveSchemaByName(org.apache.nifi.serialization.record.SchemaIdentifier schemaIdentifier) throws SchemaNotFoundException
      Throws:
      SchemaNotFoundException
    • retrieveSchemaByIdAndVersion

      private org.apache.nifi.serialization.record.RecordSchema retrieveSchemaByIdAndVersion(org.apache.nifi.serialization.record.SchemaIdentifier schemaIdentifier) throws SchemaNotFoundException
      Throws:
      SchemaNotFoundException
    • retrieveSchema

      public org.apache.nifi.serialization.record.RecordSchema retrieveSchema(org.apache.nifi.serialization.record.SchemaIdentifier schemaIdentifier) throws SchemaNotFoundException
      Specified by:
      retrieveSchema in interface SchemaRegistry
      Throws:
      SchemaNotFoundException
    • getSuppliedSchemaFields

      public Set<SchemaField> getSuppliedSchemaFields()
      Specified by:
      getSuppliedSchemaFields in interface SchemaRegistry