java.lang.Object
org.apache.camel.builder.BuilderSupport
org.apache.camel.builder.RouteBuilder
org.alfresco.hxi_connector.prediction_applier.hx_insight.PredictionCollector
All Implemented Interfaces:
org.apache.camel.builder.ModelRoutesBuilder, org.apache.camel.CamelContextAware, org.apache.camel.Ordered, org.apache.camel.RoutesBuilder, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.ResourceAware

@Component public class PredictionCollector extends org.apache.camel.builder.RouteBuilder
  • Field Summary

    Fields inherited from class org.apache.camel.builder.RouteBuilder

    log

    Fields inherited from interface org.apache.camel.Ordered

    HIGHEST, LOWEST
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Polls all available prediction batches and sends them (one by one) to the internal buffer for further processing.

    Methods inherited from class org.apache.camel.builder.RouteBuilder

    addLifecycleInterceptor, addRoutes, addRoutesToCamelContext, addTemplatedRoutesToCamelContext, bindToRegistry, bindToRegistry, checkInitialized, configuration, configureRest, configureRests, configureRoute, configureRouteConfiguration, configureRoutes, configureRouteTemplate, configureTemplatedRoute, dataFormat, errorHandler, errorHandler, expression, from, from, from, fromF, fromV, fromV, getBeans, getOrder, getResource, getRestCollection, getRestConfiguration, getRests, getRouteCollection, getRoutes, getRouteTemplateCollection, getTemplatedRouteCollection, initializeCamelContext, intercept, interceptFrom, interceptFrom, interceptSendToEndpoint, loadRoutesBuilder, loadRoutesBuilder, onCompletion, onException, onException, populateBeans, populateOrUpdateRoutes, populateRests, populateRoutes, populateRouteTemplates, populateTemplatedRoutes, populateTransformers, populateValidators, prepareModel, property, propertyInject, removeLifecycleInterceptor, rest, rest, restConfiguration, routeTemplate, setErrorHandlerFactory, setResource, setRestCollection, setRouteTemplateCollection, setTemplatedRouteCollection, templatedRoute, toString, transformer, updateRoutesToCamelContext, validator

    Methods inherited from class org.apache.camel.builder.BuilderSupport

    body, bodyAs, constant, constant, constant, createErrorHandlerBuilder, csimple, csimple, datasonnet, datasonnet, datasonnet, deadLetterChannel, deadLetterChannel, defaultErrorHandler, endpoint, endpoint, exceptionMessage, exchangeProperty, expression, getCamelContext, getContext, getErrorHandlerFactory, hasErrorHandlerFactory, header, java, java, joor, joor, jq, jq, jsonpath, jsonpath, jtaTransactionErrorHandler, jtaTransactionErrorHandler, jtaTransactionErrorHandler, method, method, method, method, noErrorHandler, regexReplaceAll, regexReplaceAll, setCamelContext, simple, simple, simpleF, simpleF, springTransactionErrorHandler, springTransactionErrorHandler, springTransactionErrorHandler, systemProperty, systemProperty, variable, xpath, xpath, xpath, xpath

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PredictionCollector

      public PredictionCollector()
  • Method Details

    • configure

      public void configure()
      Polls all available prediction batches and sends them (one by one) to the internal buffer for further processing.

      You can imagine that you have the following predictions waiting in hxi: 1. [prediction1, prediction2] 2. [prediction3, prediction4]

      Processor PREDICTION_PROCESSOR after being triggered will: 1. Fetch the first batch (prediction1, prediction2) 1.1. Send prediction1 to the internal buffer 1.2. Send prediction2 to the internal buffer 2. Fetch the second batch (prediction3, prediction4) 2.1. Send prediction3 to the internal buffer 2.2. Send prediction4 to the internal buffer 3. Exit and wait for the next trigger

      By default, the processor is triggered by the quartz scheduler every 5 minutes.

      Specified by:
      configure in class org.apache.camel.builder.RouteBuilder