The Java SDK adds evalFeatures for evaluating several feature keys for the same user. Instead of calling the single-feature API repeatedly, pass a list of keys and receive a map of individual FeatureResult objects.
Get results by feature key
Both the single-user and multi-user clients use one evaluation context for the batch. The result map preserves the first appearance of each key and deduplicates repeated top-level keys. Use Object.class when the requested flags contain different value types.
For an initialized multi-user client and an existing userContext, a call can look like this:
Map<String, FeatureResult<Object>> results = gb.evalFeatures(
Arrays.asList("new-checkout", "button-color"),
Object.class,
userContext
);Inspect each result by its feature key. If evaluating a key throws a RuntimeException, that key receives an UNKNOWN_FEATURE result with a null value, while the remaining keys can still be evaluated. This does not turn the batch into a single success-or-failure result.
Getting started
Follow the Java SDK setup guide, confirm your installed package exposes evalFeatures, and try it with a small set of flags for one user. Check result handling and tracking callbacks before replacing existing single-feature calls.
Available on All plans, Cloud and Self-hosted.