public final class LDReactorClient extends java.lang.Object implements LDReactorClientInterface
LDClient
that aims to adapt it to reactive stream programming.
Methods that are potentially long running or that use IO have been wrapped to return Mono
s 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 and 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.
|
Modifier and Type | Method and 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()
See
LDClient.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)
|
void |
flush()
See
LDClient.flush() . |
BigSegmentStoreStatusProvider |
getBigSegmentStoreStatusProvider()
|
DataSourceStatusProvider |
getDataSourceStatusProvider()
|
DataStoreStatusProvider |
getDataStoreStatusProvider()
|
FlagTracker |
getFlagTracker()
|
void |
identify(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)
|
boolean |
isFlagKnown(java.lang.String featureKey)
|
boolean |
isInitialized()
|
boolean |
isOffline()
See
LDClient.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.String |
secureModeHash(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)
|
void |
track(java.lang.String eventName,
LDContext context)
|
void |
trackData(java.lang.String eventName,
LDContext context,
LDValue data)
|
void |
trackMetric(java.lang.String eventName,
LDContext context,
LDValue data,
double metricValue)
|
java.lang.String |
version()
See
LDClient.version() . |
public LDReactorClient(java.lang.String sdkKey, reactor.core.scheduler.Scheduler scheduler)
sdkKey
- the SDK key for your LaunchDarkly environmentscheduler
- that will execute wrapped client methodspublic LDReactorClient(java.lang.String sdkKey, LDConfig config, reactor.core.scheduler.Scheduler scheduler)
sdkKey
- the SDK key for your LaunchDarkly environmentconfig
- a client configuration objectscheduler
- that will execute wrapped client methodspublic boolean isInitialized()
LDReactorClientInterface
isInitialized
in interface LDReactorClientInterface
public void track(java.lang.String eventName, LDContext context)
LDReactorClientInterface
track
in interface LDReactorClientInterface
eventName
- see linked reference.context
- see linked reference.public void trackData(java.lang.String eventName, LDContext context, LDValue data)
LDReactorClientInterface
trackData
in interface LDReactorClientInterface
eventName
- see linked reference.context
- see linked reference.data
- see linked reference.public void trackMetric(java.lang.String eventName, LDContext context, LDValue data, double metricValue)
LDReactorClientInterface
trackMetric
in interface LDReactorClientInterface
eventName
- see linked reference.context
- see linked reference.data
- see linked reference.metricValue
- see linked reference.public void identify(LDContext context)
LDReactorClientInterface
identify
in interface LDReactorClientInterface
context
- see linked reference.public reactor.core.publisher.Mono<FeatureFlagsState> allFlagsState(LDContext context, FlagsStateOption... options)
LDReactorClientInterface
allFlagsState
in interface LDReactorClientInterface
context
- see linked reference.options
- see linked reference.Mono
that will emit the FeatureFlagsState
.public reactor.core.publisher.Mono<java.lang.Boolean> boolVariation(java.lang.String featureKey, LDContext context, boolean defaultValue)
LDReactorClientInterface
boolVariation
in interface LDReactorClientInterface
featureKey
- see linked reference.context
- see linked reference.defaultValue
- see linked reference.Mono
that will emit the evaluation result.public reactor.core.publisher.Mono<java.lang.Integer> intVariation(java.lang.String featureKey, LDContext context, int defaultValue)
LDReactorClientInterface
intVariation
in interface LDReactorClientInterface
featureKey
- see linked reference.context
- see linked reference.defaultValue
- see linked reference.Mono
that will emit the evaluation result.public reactor.core.publisher.Mono<java.lang.Double> doubleVariation(java.lang.String featureKey, LDContext context, double defaultValue)
LDReactorClientInterface
doubleVariation
in interface LDReactorClientInterface
featureKey
- see linked reference.context
- see linked reference.defaultValue
- see linked reference.Mono
that will emit the evaluation result.public reactor.core.publisher.Mono<java.lang.String> stringVariation(java.lang.String featureKey, LDContext context, java.lang.String defaultValue)
LDReactorClientInterface
stringVariation
in interface LDReactorClientInterface
featureKey
- see linked reference.context
- see linked reference.defaultValue
- see linked reference.Mono
that will emit the evaluation result.public reactor.core.publisher.Mono<LDValue> jsonValueVariation(java.lang.String featureKey, LDContext context, LDValue defaultValue)
LDReactorClientInterface
jsonValueVariation
in interface LDReactorClientInterface
featureKey
- see linked reference.context
- see linked reference.defaultValue
- see linked reference.Mono
that will emit the evaluation result.public reactor.core.publisher.Mono<EvaluationDetail<java.lang.Boolean>> boolVariationDetail(java.lang.String featureKey, LDContext context, boolean defaultValue)
LDReactorClientInterface
boolVariationDetail
in interface LDReactorClientInterface
featureKey
- see linked reference.context
- see linked reference.defaultValue
- see linked reference.Mono
that will emit the evaluation result.public reactor.core.publisher.Mono<EvaluationDetail<java.lang.Integer>> intVariationDetail(java.lang.String featureKey, LDContext context, int defaultValue)
LDReactorClientInterface
intVariationDetail
in interface LDReactorClientInterface
featureKey
- see linked reference.context
- see linked reference.defaultValue
- see linked reference.Mono
that will emit the evaluation result.public reactor.core.publisher.Mono<EvaluationDetail<java.lang.Double>> doubleVariationDetail(java.lang.String featureKey, LDContext context, double defaultValue)
LDReactorClientInterface
doubleVariationDetail
in interface LDReactorClientInterface
featureKey
- see linked reference.context
- see linked reference.defaultValue
- see linked reference.Mono
that will emit the evaluation result.public reactor.core.publisher.Mono<EvaluationDetail<java.lang.String>> stringVariationDetail(java.lang.String featureKey, LDContext context, java.lang.String defaultValue)
LDReactorClientInterface
stringVariationDetail
in interface LDReactorClientInterface
featureKey
- see linked reference.context
- see linked reference.defaultValue
- see linked reference.Mono
that will emit the evaluation result.public reactor.core.publisher.Mono<EvaluationDetail<LDValue>> jsonValueVariationDetail(java.lang.String featureKey, LDContext context, LDValue defaultValue)
LDReactorClientInterface
jsonValueVariationDetail
in interface LDReactorClientInterface
featureKey
- see linked reference.context
- see linked reference.defaultValue
- see linked reference.Mono
that will emit the evaluation result.public boolean isFlagKnown(java.lang.String featureKey)
LDReactorClientInterface
isFlagKnown
in interface LDReactorClientInterface
featureKey
- see linked reference.public FlagTracker getFlagTracker()
LDReactorClientInterface
getFlagTracker
in interface LDReactorClientInterface
public BigSegmentStoreStatusProvider getBigSegmentStoreStatusProvider()
LDReactorClientInterface
LDClient.getBigSegmentStoreStatusProvider()
. Getting the BigSegmentStoreStatusProvider
is
not a blocking operation, but function calls on the BigSegmentStoreStatusProvider
may be.getBigSegmentStoreStatusProvider
in interface LDReactorClientInterface
public DataStoreStatusProvider getDataStoreStatusProvider()
LDReactorClientInterface
LDClient.getDataStoreStatusProvider()
. Getting the DataStoreStatusProvider
is not a blocking
operation, but function calls on the DataStoreStatusProvider
may be.getDataStoreStatusProvider
in interface LDReactorClientInterface
public DataSourceStatusProvider getDataSourceStatusProvider()
LDReactorClientInterface
LDClient.getDataSourceStatusProvider()
. Getting the DataSourceStatusProvider
is not a
blocking operation, but function calls on the DataSourceStatusProvider
may be.getDataSourceStatusProvider
in interface LDReactorClientInterface
public reactor.core.publisher.Mono<java.lang.Void> close()
LDReactorClientInterface
LDClient.close()
.close
in interface LDReactorClientInterface
LDClient.close()
completes.public void flush()
LDReactorClientInterface
LDClient.flush()
.flush
in interface LDReactorClientInterface
public boolean isOffline()
LDReactorClientInterface
LDClient.isOffline()
.isOffline
in interface LDReactorClientInterface
public java.lang.String secureModeHash(LDContext context)
LDReactorClientInterface
secureModeHash
in interface LDReactorClientInterface
context
- see linked reference.public java.lang.String version()
LDReactorClientInterface
LDClient.version()
.version
in interface LDReactorClientInterface