Class KafkaDriverAdapter

  • Constructor Details

    • KafkaDriverAdapter

      public KafkaDriverAdapter(NBComponent parentComponent, NBLabels labels)
  • Method Details

    • getOpMapper

      public OpMapper<KafkaOp,KafkaSpace> getOpMapper()
      Description copied from interface: DriverAdapter
      Op Mapping

      An Op Mapper is a function which can look at a ParsedOp and create a matching OpDispenser. An OpDispenser is a function that will produce a special type DriverAdapter that this DriverAdapter implements. There may be many different ops supported by an adapter, thus there may be similarly many dispensers.

      Both OpMapper and OpDispenser are functions. The role of OpMapper is to map the op template provided by the user to an op implementation provided by the driver adapter, and then to create a suitable function for creating that type of operations, known as the OpDispenser.

      These roles are split for a very good reason: Mapping what the user wants to do with an op template is resource intensive, and should be as pre-baked as possible. This phase is the op mapping phase. It is essential that the mapping logic be very clear and maintainable. Performance is not as important at this phase, because all of the mapping logic is run during initialization of an activity.

      Conversely, op dispensing (the next phase) while an activity is running should be as efficient as possible.

      Returns:
      a dispensing function for an DriverAdapter op generation
    • getConfigModel

      public NBConfigModel getConfigModel()
      Description copied from class: BaseDriverAdapter
      In order to be provided with config information, it is required that the driver adapter specify the valid configuration options, their types, and so on.
      Specified by:
      getConfigModel in interface NBConfigModelProvider
      Specified by:
      getConfigModel in interface NBConfigurable
      Overrides:
      getConfigModel in class BaseDriverAdapter<KafkaOp,KafkaSpace>
      Returns:
      A valid configuration model for the implementing class