Class Options
java.lang.Object
growthbook.sdk.java.multiusermode.configurations.Options
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionOptions(Boolean enabled, Boolean isQaMode, Boolean isCacheDisabled, Boolean allowUrlOverrides, String url, String apiHost, String clientKey, String decryptionKey, List<String> stickyBucketIdentifierAttributes, StickyBucketService stickyBucketService, TrackingCallbackWithUser trackingCallBackWithUser, FeatureUsageCallbackWithUser featureUsageCallbackWithUser, FeatureRefreshStrategy refreshStrategy, Integer swrTtlSeconds, FeatureRefreshCallback featureRefreshCallback, com.google.gson.JsonObject globalAttributes, Map<String, Object> globalForcedFeatureValues, Map<String, ?> globalForcedVariationsMap, GbCacheManager cacheManager, CacheMode cacheMode, String cacheDirectory, Boolean remoteEval, List<String> cacheKeyAttributes, Integer remoteEvalCacheSize, Integer remoteEvalCacheTtlSeconds, Duration backgroundFetchInterval, FeatureFetchRetryPolicy retryPolicy, List<GrowthBookPlugin> plugins) Options(Boolean enabled, Boolean isQaMode, Boolean isCacheDisabled, Boolean allowUrlOverrides, String url, String apiHost, String clientKey, String decryptionKey, List<String> stickyBucketIdentifierAttributes, StickyBucketService stickyBucketService, TrackingCallbackWithUser trackingCallBackWithUser, FeatureUsageCallbackWithUser featureUsageCallbackWithUser, FeatureRefreshStrategy refreshStrategy, Integer swrTtlSeconds, FeatureRefreshCallback featureRefreshCallback, com.google.gson.JsonObject globalAttributes, Map<String, Object> globalForcedFeatureValues, Map<String, Integer> globalForcedVariationsMap, GbCacheManager cacheManager, CacheMode cacheMode, String cacheDirectory) Backward-compatible constructor retained for integrations created before background refresh intervals and retry policies were introduced. -
Method Summary
Modifier and TypeMethodDescriptionstatic Options.OptionsBuilderbuilder()booleanBoolean flag to allow URL overrides (default: false)String format of user attributes that are used to assign variationsOptional minimum interval between non-forced background feature refreshes.Optional decryption Key.Whether globally all experiments are enabled (default: true) Switch to globally disable all experiments.A function that takesStringandFeatureResultas arguments.com.google.gson.JsonObjectMap of user attributes that are used to assign variationsManual force feature valuesForce specific experiments to always assign a specific variation (used for QA)If true, random assignment is disabled and only explicitly forced variations are used.Plugins registered with the GrowthBook client.Strategy for building urlHard expiry (seconds) for cached remote-eval responses;nulldisables time-based expiry.Optional bounded retry policy.List of user's attributes keys.The standard cache TTL to use.A function that takesExperimentandExperimentResultas arguments.getUrl()inthashCode()booleanvoidsetAllowUrlOverrides(Boolean allowUrlOverrides) Boolean flag to allow URL overrides (default: false)voidsetApiHost(String apiHost) voidsetAttributesJson(String attributesJson) String format of user attributes that are used to assign variationsvoidsetBackgroundFetchInterval(Duration backgroundFetchInterval) Optional minimum interval between non-forced background feature refreshes.voidsetCacheDirectory(String cacheDirectory) voidsetCacheKeyAttributes(List<String> cacheKeyAttributes) voidsetCacheManager(GbCacheManager cacheManager) voidsetCacheMode(CacheMode cacheMode) voidsetClientKey(String clientKey) voidsetDecryptionKey(String decryptionKey) Optional decryption Key.voidsetEnabled(Boolean enabled) Whether globally all experiments are enabled (default: true) Switch to globally disable all experiments.voidsetFeatureRefreshCallback(FeatureRefreshCallback featureRefreshCallback) voidsetFeatureUsageCallbackWithUser(FeatureUsageCallbackWithUser featureUsageCallbackWithUser) A function that takesStringandFeatureResultas arguments.voidsetGlobalAttributes(String attributesJson) voidsetGlobalForcedFeatureValues(Map<String, Object> globalForcedFeatureValues) Manual force feature valuesvoidsetGlobalForcedVariationsMap(Map<String, ?> globalForcedVariationsMap) voidvoidsetIsCacheDisabled(Boolean isCacheDisabled) voidsetIsQaMode(Boolean isQaMode) If true, random assignment is disabled and only explicitly forced variations are used.voidsetPlugins(List<GrowthBookPlugin> plugins) Plugins registered with the GrowthBook client.voidsetRefreshStrategy(FeatureRefreshStrategy refreshStrategy) Strategy for building urlvoidsetRemoteEval(Boolean remoteEval) voidsetRemoteEvalCacheSize(Integer remoteEvalCacheSize) voidsetRemoteEvalCacheTtlSeconds(Integer remoteEvalCacheTtlSeconds) Hard expiry (seconds) for cached remote-eval responses;nulldisables time-based expiry.voidsetRetryPolicy(FeatureFetchRetryPolicy retryPolicy) Optional bounded retry policy.voidsetStickyBucketIdentifierAttributes(List<String> stickyBucketIdentifierAttributes) List of user's attributes keys.voidsetStickyBucketService(StickyBucketService stickyBucketService) Service that provide functionality of Sticky BucketingvoidsetSwrTtlSeconds(Integer swrTtlSeconds) The standard cache TTL to use.voidsetTrackingCallBackWithUser(TrackingCallbackWithUser trackingCallBackWithUser) A function that takesExperimentandExperimentResultas arguments.voidtoString()
-
Constructor Details
-
Options
public Options(@Nullable Boolean enabled, Boolean isQaMode, @Nullable Boolean isCacheDisabled, Boolean allowUrlOverrides, @Nullable String url, @Nullable String apiHost, @Nullable String clientKey, @Nullable String decryptionKey, @Nullable List<String> stickyBucketIdentifierAttributes, @Nullable StickyBucketService stickyBucketService, @Nullable TrackingCallbackWithUser trackingCallBackWithUser, @Nullable FeatureUsageCallbackWithUser featureUsageCallbackWithUser, @Nullable FeatureRefreshStrategy refreshStrategy, @Nullable Integer swrTtlSeconds, @Nullable FeatureRefreshCallback featureRefreshCallback, @Nullable com.google.gson.JsonObject globalAttributes, @Nullable Map<String, Object> globalForcedFeatureValues, @Nullable Map<String, Integer> globalForcedVariationsMap, @Nullable GbCacheManager cacheManager, @Nullable CacheMode cacheMode, @Nullable String cacheDirectory) Backward-compatible constructor retained for integrations created before background refresh intervals and retry policies were introduced. -
Options
public Options(@Nullable Boolean enabled, Boolean isQaMode, @Nullable Boolean isCacheDisabled, Boolean allowUrlOverrides, @Nullable String url, @Nullable String apiHost, @Nullable String clientKey, @Nullable String decryptionKey, @Nullable List<String> stickyBucketIdentifierAttributes, @Nullable StickyBucketService stickyBucketService, @Nullable TrackingCallbackWithUser trackingCallBackWithUser, @Nullable FeatureUsageCallbackWithUser featureUsageCallbackWithUser, @Nullable FeatureRefreshStrategy refreshStrategy, @Nullable Integer swrTtlSeconds, @Nullable FeatureRefreshCallback featureRefreshCallback, @Nullable com.google.gson.JsonObject globalAttributes, @Nullable Map<String, Object> globalForcedFeatureValues, @Nullable Map<String, ?> globalForcedVariationsMap, @Nullable GbCacheManager cacheManager, @Nullable CacheMode cacheMode, @Nullable String cacheDirectory, @Nullable Boolean remoteEval, @Nullable List<String> cacheKeyAttributes, @Nullable Integer remoteEvalCacheSize, @Nullable Integer remoteEvalCacheTtlSeconds, @Nullable Duration backgroundFetchInterval, @Nullable FeatureFetchRetryPolicy retryPolicy, @Nullable List<GrowthBookPlugin> plugins)
-
-
Method Details
-
setGlobalForcedVariationsMap
-
getRefreshingStrategy
-
getCacheMode
-
getCacheDirectory
-
getStickyBucketService
-
setInMemoryStickyBucketService
public void setInMemoryStickyBucketService() -
setGlobalAttributes
-
isRemoteEvalEnabled
public boolean isRemoteEvalEnabled() -
builder
-
getEnabled
Whether globally all experiments are enabled (default: true) Switch to globally disable all experiments. -
getIsQaMode
If true, random assignment is disabled and only explicitly forced variations are used. -
getIsCacheDisabled
-
getAllowUrlOverrides
Boolean flag to allow URL overrides (default: false) -
getUrl
-
getApiHost
-
getClientKey
-
getDecryptionKey
Optional decryption Key. If this is not null, featuresJson should be an encrypted payload. -
getStickyBucketIdentifierAttributes
List of user's attributes keys. -
getTrackingCallBackWithUser
A function that takesExperimentandExperimentResultas arguments. -
getFeatureUsageCallbackWithUser
A function that takesStringandFeatureResultas arguments. A callback that will be invoked every time a feature is viewed. Listen for feature usage events -
getRefreshStrategy
Strategy for building url -
getSwrTtlSeconds
The standard cache TTL to use. -
getGlobalAttributes
@Nullable public com.google.gson.JsonObject getGlobalAttributes()Map of user attributes that are used to assign variations -
getAttributesJson
String format of user attributes that are used to assign variations -
getGlobalForcedFeatureValues
Manual force feature values -
getGlobalForcedVariationsMap
Force specific experiments to always assign a specific variation (used for QA) -
getFeatureRefreshCallback
-
getCacheManager
-
getPlugins
Plugins registered with the GrowthBook client. SeeGrowthBookPluginandGrowthBookTrackingPlugin. The owning client builds a per-instancePluginRegistryfrom this list; the registry itself is carried onEvaluationContext, not here, so reusing oneOptionsacross clients stays isolated. -
getRemoteEval
-
getCacheKeyAttributes
-
getRemoteEvalCacheSize
-
getRemoteEvalCacheTtlSeconds
Hard expiry (seconds) for cached remote-eval responses;nulldisables time-based expiry. -
getBackgroundFetchInterval
Optional minimum interval between non-forced background feature refreshes. -
getRetryPolicy
Optional bounded retry policy. Repositories use the default policy when null. -
setEnabled
Whether globally all experiments are enabled (default: true) Switch to globally disable all experiments. -
setIsQaMode
If true, random assignment is disabled and only explicitly forced variations are used. -
setIsCacheDisabled
-
setAllowUrlOverrides
Boolean flag to allow URL overrides (default: false) -
setUrl
-
setApiHost
-
setClientKey
-
setDecryptionKey
Optional decryption Key. If this is not null, featuresJson should be an encrypted payload. -
setStickyBucketIdentifierAttributes
public void setStickyBucketIdentifierAttributes(@Nullable List<String> stickyBucketIdentifierAttributes) List of user's attributes keys. -
setStickyBucketService
Service that provide functionality of Sticky Bucketing -
setTrackingCallBackWithUser
public void setTrackingCallBackWithUser(@Nullable TrackingCallbackWithUser trackingCallBackWithUser) A function that takesExperimentandExperimentResultas arguments. -
setFeatureUsageCallbackWithUser
public void setFeatureUsageCallbackWithUser(@Nullable FeatureUsageCallbackWithUser featureUsageCallbackWithUser) A function that takesStringandFeatureResultas arguments. A callback that will be invoked every time a feature is viewed. Listen for feature usage events -
setRefreshStrategy
Strategy for building url -
setSwrTtlSeconds
The standard cache TTL to use. -
setAttributesJson
String format of user attributes that are used to assign variations -
setGlobalForcedFeatureValues
Manual force feature values -
setFeatureRefreshCallback
-
setCacheManager
-
setCacheMode
-
setCacheDirectory
-
setPlugins
Plugins registered with the GrowthBook client. SeeGrowthBookPluginandGrowthBookTrackingPlugin. The owning client builds a per-instancePluginRegistryfrom this list; the registry itself is carried onEvaluationContext, not here, so reusing oneOptionsacross clients stays isolated. -
setRemoteEval
-
setCacheKeyAttributes
-
setRemoteEvalCacheSize
-
setRemoteEvalCacheTtlSeconds
Hard expiry (seconds) for cached remote-eval responses;nulldisables time-based expiry. -
setBackgroundFetchInterval
Optional minimum interval between non-forced background feature refreshes. -
setRetryPolicy
Optional bounded retry policy. Repositories use the default policy when null. -
equals
-
hashCode
public int hashCode() -
toString
-