Class AbstractRay<T>

java.lang.Object
io.vertx.tp.modular.reference.AbstractRay<T>
All Implemented Interfaces:
AoRay<T>
Direct Known Subclasses:
RayBatch, RaySingle

public abstract class AbstractRay<T> extends Object implements AoRay<T>
## Abstract Reference Processor ### 1. Intro Template pattern to provide all the calculation metadata in current class, all sub-classes could share the data structure that current class defined. ### 2. Components Here are two hash maps that stored `field = xx`, the `xx` means components of following two categories: - RaySource: The field calculator component that contains code logical ( Action ). - DataQRule: The field definition rules POJO data object that contains metadata definition ( Rule ).
Author:
Lang
  • Field Details

    • tpl

      protected transient DataTpl tpl
      The reference to DataTpl that be related to model definition.
    • input

      protected transient ConcurrentMap<String,io.vertx.tp.modular.reference.RaySource> input
      The hashmap reference of `field = RaySource`.
    • output

      protected transient ConcurrentMap<String,io.aeon.experiment.reference.RResult> output
      The hashmap reference of `field = HRule`.
  • Constructor Details

    • AbstractRay

      public AbstractRay()
  • Method Details

    • on

      public AoRay<T> on(DataTpl tpl)
      Bind the component to data model template DataTpl. The critical code logical is as following: - Bind the DataTpl to instance member `tpl`. - Be sure the DataAtom in DataTpl is valid. - Calculate the two hash maps in this method.
      Specified by:
      on in interface AoRay<T>
      Parameters:
      tpl - DataTpl The template that will be bind.
      Returns:
      AoRay The component reference
      Throws:
      _501AnonymousAtomException - Atom in tpl contains errors.
    • doRay

      public T doRay(T input)
      This method will modify the input HRecord element(s). Here contains `shorten` code logical when the hash map is EMPTY, skip reference calculator.
      Specified by:
      doRay in interface AoRay<T>
      Parameters:
      input - Input element of HRecord for single/multi
      Returns:
      Return the modified data record(s).
    • doRayAsync

      public io.vertx.core.Future<T> doRayAsync(T input)
      Specified by:
      doRayAsync in interface AoRay<T>
    • exec

      public abstract T exec(T input)
      This method must be inherit by all sub-classes, it provide reference data mounting.
      Parameters:
      input - Input element of HRecord for single/multi
      Returns:
      Return the modified data record(s).
    • execAsync

      public abstract io.vertx.core.Future<T> execAsync(T input)
    • thenCombine

      protected io.vertx.core.Future<ConcurrentMap<String,io.vertx.core.json.JsonArray>> thenCombine(List<io.vertx.core.Future<ConcurrentMap<String,io.vertx.core.json.JsonArray>>> futures)