Class LDReactorClient
- java.lang.Object
-
- com.launchdarkly.sdk.server.integrations.reactor.LDReactorClient
-
- All Implemented Interfaces:
LDReactorClientInterface
public final class LDReactorClient extends java.lang.Object implements LDReactorClientInterface
A thin wrapper of theLDClientthat aims to adapt it to reactive stream programming. Methods that are potentially long running or that use IO have been wrapped to returnMonos and will be executed on the scheduler provided. Methods that do not have a risk of blocking have not been wrapped and are pass through.
-
-
Constructor Summary
Constructors Constructor Description LDReactorClient(java.lang.String sdkKey, LDConfig config, reactor.core.scheduler.Scheduler scheduler)Creates a client that uses the provided scheduler to execute functionality in a non-blocking manner.LDReactorClient(java.lang.String sdkKey, reactor.core.scheduler.Scheduler scheduler)Creates a client that uses the provided scheduler to execute functionality in a non-blocking manner.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<FeatureFlagsState>allFlagsState(LDContext context, FlagsStateOption... options)reactor.core.publisher.Mono<java.lang.Boolean>boolVariation(java.lang.String featureKey, LDContext context, boolean defaultValue)reactor.core.publisher.Mono<EvaluationDetail<java.lang.Boolean>>boolVariationDetail(java.lang.String featureKey, LDContext context, boolean defaultValue)reactor.core.publisher.Mono<java.lang.Void>close()SeeLDClient.close().reactor.core.publisher.Mono<java.lang.Double>doubleVariation(java.lang.String featureKey, LDContext context, double defaultValue)reactor.core.publisher.Mono<EvaluationDetail<java.lang.Double>>doubleVariationDetail(java.lang.String featureKey, LDContext context, double defaultValue)voidflush()SeeLDClient.flush().BigSegmentStoreStatusProvidergetBigSegmentStoreStatusProvider()DataSourceStatusProvidergetDataSourceStatusProvider()DataStoreStatusProvidergetDataStoreStatusProvider()FlagTrackergetFlagTracker()voididentify(LDContext context)reactor.core.publisher.Mono<java.lang.Integer>intVariation(java.lang.String featureKey, LDContext context, int defaultValue)reactor.core.publisher.Mono<EvaluationDetail<java.lang.Integer>>intVariationDetail(java.lang.String featureKey, LDContext context, int defaultValue)booleanisFlagKnown(java.lang.String featureKey)booleanisInitialized()booleanisOffline()SeeLDClient.isOffline().reactor.core.publisher.Mono<LDValue>jsonValueVariation(java.lang.String featureKey, LDContext context, LDValue defaultValue)reactor.core.publisher.Mono<EvaluationDetail<LDValue>>jsonValueVariationDetail(java.lang.String featureKey, LDContext context, LDValue defaultValue)java.lang.StringsecureModeHash(LDContext context)reactor.core.publisher.Mono<java.lang.String>stringVariation(java.lang.String featureKey, LDContext context, java.lang.String defaultValue)reactor.core.publisher.Mono<EvaluationDetail<java.lang.String>>stringVariationDetail(java.lang.String featureKey, LDContext context, java.lang.String defaultValue)voidtrack(java.lang.String eventName, LDContext context)voidtrackData(java.lang.String eventName, LDContext context, LDValue data)voidtrackMetric(java.lang.String eventName, LDContext context, LDValue data, double metricValue)java.lang.Stringversion()SeeLDClient.version().
-
-
-
Constructor Detail
-
LDReactorClient
public LDReactorClient(java.lang.String sdkKey, reactor.core.scheduler.Scheduler scheduler)Creates a client that uses the provided scheduler to execute functionality in a non-blocking manner.- Parameters:
sdkKey- the SDK key for your LaunchDarkly environmentscheduler- that will execute wrapped client methods
-
LDReactorClient
public LDReactorClient(java.lang.String sdkKey, LDConfig config, reactor.core.scheduler.Scheduler scheduler)Creates a client that uses the provided scheduler to execute functionality in a non-blocking manner.- Parameters:
sdkKey- the SDK key for your LaunchDarkly environmentconfig- a client configuration objectscheduler- that will execute wrapped client methods
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
Description copied from interface:LDReactorClientInterface- Specified by:
isInitializedin interfaceLDReactorClientInterface- Returns:
- see linked reference.
-
track
public void track(java.lang.String eventName, LDContext context)Description copied from interface:LDReactorClientInterface- Specified by:
trackin interfaceLDReactorClientInterface- Parameters:
eventName- see linked reference.context- see linked reference.
-
trackData
public void trackData(java.lang.String eventName, LDContext context, LDValue data)Description copied from interface:LDReactorClientInterface- Specified by:
trackDatain interfaceLDReactorClientInterface- Parameters:
eventName- see linked reference.context- see linked reference.data- see linked reference.
-
trackMetric
public void trackMetric(java.lang.String eventName, LDContext context, LDValue data, double metricValue)Description copied from interface:LDReactorClientInterface- Specified by:
trackMetricin interfaceLDReactorClientInterface- Parameters:
eventName- see linked reference.context- see linked reference.data- see linked reference.metricValue- see linked reference.
-
identify
public void identify(LDContext context)
Description copied from interface:LDReactorClientInterface- Specified by:
identifyin interfaceLDReactorClientInterface- Parameters:
context- see linked reference.
-
allFlagsState
public reactor.core.publisher.Mono<FeatureFlagsState> allFlagsState(LDContext context, FlagsStateOption... options)
Description copied from interface:LDReactorClientInterface- Specified by:
allFlagsStatein interfaceLDReactorClientInterface- Parameters:
context- see linked reference.options- see linked reference.- Returns:
- a
Monothat will emit theFeatureFlagsState.
-
boolVariation
public reactor.core.publisher.Mono<java.lang.Boolean> boolVariation(java.lang.String featureKey, LDContext context, boolean defaultValue)Description copied from interface:LDReactorClientInterface- Specified by:
boolVariationin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.context- see linked reference.defaultValue- see linked reference.- Returns:
- a
Monothat will emit the evaluation result.
-
intVariation
public reactor.core.publisher.Mono<java.lang.Integer> intVariation(java.lang.String featureKey, LDContext context, int defaultValue)Description copied from interface:LDReactorClientInterface- Specified by:
intVariationin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.context- see linked reference.defaultValue- see linked reference.- Returns:
- a
Monothat will emit the evaluation result.
-
doubleVariation
public reactor.core.publisher.Mono<java.lang.Double> doubleVariation(java.lang.String featureKey, LDContext context, double defaultValue)Description copied from interface:LDReactorClientInterface- Specified by:
doubleVariationin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.context- see linked reference.defaultValue- see linked reference.- Returns:
- a
Monothat will emit the evaluation result.
-
stringVariation
public reactor.core.publisher.Mono<java.lang.String> stringVariation(java.lang.String featureKey, LDContext context, java.lang.String defaultValue)Description copied from interface:LDReactorClientInterface- Specified by:
stringVariationin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.context- see linked reference.defaultValue- see linked reference.- Returns:
- a
Monothat will emit the evaluation result.
-
jsonValueVariation
public reactor.core.publisher.Mono<LDValue> jsonValueVariation(java.lang.String featureKey, LDContext context, LDValue defaultValue)
Description copied from interface:LDReactorClientInterface- Specified by:
jsonValueVariationin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.context- see linked reference.defaultValue- see linked reference.- Returns:
- a
Monothat will emit the evaluation result.
-
boolVariationDetail
public reactor.core.publisher.Mono<EvaluationDetail<java.lang.Boolean>> boolVariationDetail(java.lang.String featureKey, LDContext context, boolean defaultValue)
Description copied from interface:LDReactorClientInterface- Specified by:
boolVariationDetailin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.context- see linked reference.defaultValue- see linked reference.- Returns:
- a
Monothat will emit the evaluation result.
-
intVariationDetail
public reactor.core.publisher.Mono<EvaluationDetail<java.lang.Integer>> intVariationDetail(java.lang.String featureKey, LDContext context, int defaultValue)
Description copied from interface:LDReactorClientInterface- Specified by:
intVariationDetailin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.context- see linked reference.defaultValue- see linked reference.- Returns:
- a
Monothat will emit the evaluation result.
-
doubleVariationDetail
public reactor.core.publisher.Mono<EvaluationDetail<java.lang.Double>> doubleVariationDetail(java.lang.String featureKey, LDContext context, double defaultValue)
Description copied from interface:LDReactorClientInterface- Specified by:
doubleVariationDetailin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.context- see linked reference.defaultValue- see linked reference.- Returns:
- a
Monothat will emit the evaluation result.
-
stringVariationDetail
public reactor.core.publisher.Mono<EvaluationDetail<java.lang.String>> stringVariationDetail(java.lang.String featureKey, LDContext context, java.lang.String defaultValue)
Description copied from interface:LDReactorClientInterface- Specified by:
stringVariationDetailin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.context- see linked reference.defaultValue- see linked reference.- Returns:
- a
Monothat will emit the evaluation result.
-
jsonValueVariationDetail
public reactor.core.publisher.Mono<EvaluationDetail<LDValue>> jsonValueVariationDetail(java.lang.String featureKey, LDContext context, LDValue defaultValue)
Description copied from interface:LDReactorClientInterface- Specified by:
jsonValueVariationDetailin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.context- see linked reference.defaultValue- see linked reference.- Returns:
- a
Monothat will emit the evaluation result.
-
isFlagKnown
public boolean isFlagKnown(java.lang.String featureKey)
Description copied from interface:LDReactorClientInterface- Specified by:
isFlagKnownin interfaceLDReactorClientInterface- Parameters:
featureKey- see linked reference.- Returns:
- see linked reference.
-
getFlagTracker
public FlagTracker getFlagTracker()
Description copied from interface:LDReactorClientInterface- Specified by:
getFlagTrackerin interfaceLDReactorClientInterface- Returns:
- see linked reference.
-
getBigSegmentStoreStatusProvider
public BigSegmentStoreStatusProvider getBigSegmentStoreStatusProvider()
Description copied from interface:LDReactorClientInterfaceSeeLDClient.getBigSegmentStoreStatusProvider(). Getting theBigSegmentStoreStatusProvideris not a blocking operation, but function calls on theBigSegmentStoreStatusProvidermay be.- Specified by:
getBigSegmentStoreStatusProviderin interfaceLDReactorClientInterface- Returns:
- see linked reference.
-
getDataStoreStatusProvider
public DataStoreStatusProvider getDataStoreStatusProvider()
Description copied from interface:LDReactorClientInterfaceSeeLDClient.getDataStoreStatusProvider(). Getting theDataStoreStatusProvideris not a blocking operation, but function calls on theDataStoreStatusProvidermay be.- Specified by:
getDataStoreStatusProviderin interfaceLDReactorClientInterface- Returns:
- see linked reference.
-
getDataSourceStatusProvider
public DataSourceStatusProvider getDataSourceStatusProvider()
Description copied from interface:LDReactorClientInterfaceSeeLDClient.getDataSourceStatusProvider(). Getting theDataSourceStatusProvideris not a blocking operation, but function calls on theDataSourceStatusProvidermay be.- Specified by:
getDataSourceStatusProviderin interfaceLDReactorClientInterface- Returns:
- see linked reference.
-
close
public reactor.core.publisher.Mono<java.lang.Void> close()
Description copied from interface:LDReactorClientInterfaceSeeLDClient.close().- Specified by:
closein interfaceLDReactorClientInterface- Returns:
- a Mono that completes when
LDClient.close()completes.
-
flush
public void flush()
Description copied from interface:LDReactorClientInterfaceSeeLDClient.flush().- Specified by:
flushin interfaceLDReactorClientInterface
-
isOffline
public boolean isOffline()
Description copied from interface:LDReactorClientInterfaceSeeLDClient.isOffline().- Specified by:
isOfflinein interfaceLDReactorClientInterface- Returns:
- see linked reference.
-
secureModeHash
public java.lang.String secureModeHash(LDContext context)
Description copied from interface:LDReactorClientInterface- Specified by:
secureModeHashin interfaceLDReactorClientInterface- Parameters:
context- see linked reference.- Returns:
- see linked reference.
-
version
public java.lang.String version()
Description copied from interface:LDReactorClientInterfaceSeeLDClient.version().- Specified by:
versionin interfaceLDReactorClientInterface- Returns:
- see linked reference.
-
-