Package co.featbit.server
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 Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected static final intprotected static final longprotected static final intprotected static final intprotected longprotected intprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncapacity(int capacityOfInbox) flushInterval(int flushIntervalInSecond) maxRetryTimes(int maxRetryTimes) retryInterval(long retryIntervalInMilliseconds) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface co.featbit.server.exterior.InsightEventSenderFactory
createInsightEventSenderMethods inherited from interface co.featbit.server.exterior.InsightProcessorFactory
createInsightProcessor
-
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
-
capacity
-
flushInterval
-
retryInterval
-
maxRetryTimes
-