Class GlobalContextManager
java.lang.Object
growthbook.sdk.java.multiusermode.internal.GlobalContextManager
INTERNAL: not part of the supported API. Public only because
GrowthBookClient lives in
the parent package — treat its signatures as free to change without a major version bump.
Internal coordinator for the client-level GlobalContext.
Keeps feature state updates and evaluation context creation outside the public facade.-
Constructor Summary
ConstructorsConstructorDescriptionGlobalContextManager(Options options) Creates a manager bound to the client options instance. -
Method Summary
Modifier and TypeMethodDescriptioncreateEvaluationContext(UserContext userContext) Creates an evaluation context for a specific user by overlaying user attributes on global attributes.intvoidinitialize(GBFeaturesRepository repository) Replaces the managed context with feature data from the initialized repository.voidrefresh(GBFeaturesRepository repository) Updates feature and saved-group data after a repository refresh.
-
Constructor Details
-
GlobalContextManager
Creates a manager bound to the client options instance.- Parameters:
options- client options used to build evaluation contexts
-
-
Method Details
-
initialize
Replaces the managed context with feature data from the initialized repository.- Parameters:
repository- initialized feature repository
-
refresh
Updates feature and saved-group data after a repository refresh.- Parameters:
repository- repository containing the latest parsed feature data
-
createEvaluationContext
Creates an evaluation context for a specific user by overlaying user attributes on global attributes.- Parameters:
userContext- per-user evaluation context- Returns:
- evaluation context used by feature and experiment evaluators
-
featureCount
public int featureCount()- Returns:
- number of features in the current global context (0 when uninitialized).
-