Skip to content

Commit fe3284c

Browse files
author
vishalup29
committed
Issue open-feature/java-sdk#1486 Deprecate contrib multi-provider and redirect users to SDK implementation.
Signed-off-by: vishalup29 <vishalupadhyay977@gmail.com>
1 parent 1a85794 commit fe3284c

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

providers/multiprovider/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# OpenFeature Multi-Provider for Java
22

3+
> **Deprecated:** The multi-provider has been moved into the core Java SDK.
4+
> Please use `dev.openfeature.sdk.providers.multiprovider.MultiProvider` instead.
5+
36
The OpenFeature Multi-Provider wraps multiple underlying providers in a unified interface, allowing the SDK client to transparently interact with all those providers at once.
47
This allows use cases where a single client and evaluation interface is desired, but where the flag data should come from more than one source.
58

providers/multiprovider/src/main/java/dev/openfeature/contrib/providers/multiprovider/FirstMatchStrategy.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@
1212
import lombok.extern.slf4j.Slf4j;
1313

1414
/**
15-
* First match strategy. Return the first result returned by a provider. Skip providers that
16-
* indicate they had no value due to FLAG_NOT_FOUND. In all other cases, use the value returned by
17-
* the provider. If any provider returns an error result other than FLAG_NOT_FOUND, the whole
18-
* evaluation should error and “bubble up” the individual provider’s error in the result. As soon as
19-
* a value is returned by a provider, the rest of the operation should short-circuit and not call
20-
* the rest of the providers.
15+
* @deprecated Use the strategy from the core SDK multi-provider package instead.
2116
*/
2217
@Slf4j
2318
@NoArgsConstructor

providers/multiprovider/src/main/java/dev/openfeature/contrib/providers/multiprovider/FirstSuccessfulStrategy.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
import lombok.extern.slf4j.Slf4j;
1111

1212
/**
13-
* First Successful Strategy. Similar to “First Match”, except that errors from evaluated providers
14-
* do not halt execution. Instead, it will return the first successful result from a provider. If no
15-
* provider successfully responds, it will throw an error result.
13+
* @deprecated Use the strategy from the core SDK multi-provider package instead.
1614
*/
1715
@Slf4j
1816
@NoArgsConstructor

providers/multiprovider/src/main/java/dev/openfeature/contrib/providers/multiprovider/MultiProvider.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import dev.openfeature.sdk.ProviderEvaluation;
88
import dev.openfeature.sdk.Value;
99
import dev.openfeature.sdk.exceptions.GeneralError;
10+
import dev.openfeature.sdk.providers.multiprovider.MultiProvider;
1011
import java.util.ArrayList;
1112
import java.util.Collection;
1213
import java.util.Collections;
@@ -21,7 +22,11 @@
2122
import lombok.extern.slf4j.Slf4j;
2223
import org.json.JSONObject;
2324

24-
/** Provider implementation for Multi-provider. */
25+
/**
26+
* @deprecated
27+
* Use {@link dev.openfeature.sdk.providers.multiprovider.MultiProvider}
28+
* from the core SDK instead.
29+
*/
2530
@Slf4j
2631
public class MultiProvider extends EventProvider {
2732

0 commit comments

Comments
 (0)