Class InsightProcessorBuilder

java.lang.Object
co.featbit.server.InsightProcessorBuilder
All Implemented Interfaces:
InsightEventSenderFactory, InsightProcessorFactory

public abstract class InsightProcessorBuilder extends Object implements InsightEventSenderFactory, InsightProcessorFactory
Factory to create InsightProcessor

The SDK normally buffers analytics events and sends them to feature flag center at intervals. If you want to customize this behavior, create a builder with Factory.insightProcessorFactory(), change its properties with the methods of this class, and pass it to FBConfig.Builder.insightProcessorFactory(InsightProcessorFactory):


      InsightProcessorBuilder insightProcessorBuilder = Factory.insightProcessorFactory()
                     .capacity(10000)


             FBConfig config = new FBConfig.Builder()
                     .insightProcessorFactory(insightProcessorBuilder)
                     .build();

             FBClient client = new FBClientImp(envSecret, config);
 

Note that this class is in fact only internal use, it's not recommended to customize any behavior in this configuration. We just keep the same design pattern in the SDK

  • Field Details

    • DEFAULT_CAPACITY

      protected static final int DEFAULT_CAPACITY
      See Also:
    • DEFAULT_RETRY_DELAY

      protected static final int DEFAULT_RETRY_DELAY
      See Also:
    • DEFAULT_RETRY_TIMES

      protected static final int DEFAULT_RETRY_TIMES
      See Also:
    • DEFAULT_FLUSH_INTERVAL

      protected static final long DEFAULT_FLUSH_INTERVAL
    • capacity

      protected int capacity
    • retryIntervalInMilliseconds

      protected long retryIntervalInMilliseconds
    • maxRetryTimes

      protected int maxRetryTimes
    • flushInterval

      protected long flushInterval
  • Constructor Details

    • InsightProcessorBuilder

      public InsightProcessorBuilder()
  • Method Details