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 Monos 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()
LDReactorClientInterfaceisInitialized in interface LDReactorClientInterfacepublic void track(java.lang.String eventName,
LDContext context)
LDReactorClientInterfacetrack in interface LDReactorClientInterfaceeventName - see linked reference.context - see linked reference.public void trackData(java.lang.String eventName,
LDContext context,
LDValue data)
LDReactorClientInterfacetrackData in interface LDReactorClientInterfaceeventName - see linked reference.context - see linked reference.data - see linked reference.public void trackMetric(java.lang.String eventName,
LDContext context,
LDValue data,
double metricValue)
LDReactorClientInterfacetrackMetric in interface LDReactorClientInterfaceeventName - see linked reference.context - see linked reference.data - see linked reference.metricValue - see linked reference.public void identify(LDContext context)
LDReactorClientInterfaceidentify in interface LDReactorClientInterfacecontext - see linked reference.public reactor.core.publisher.Mono<FeatureFlagsState> allFlagsState(LDContext context, FlagsStateOption... options)
LDReactorClientInterfaceallFlagsState in interface LDReactorClientInterfacecontext - 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)
LDReactorClientInterfaceboolVariation in interface LDReactorClientInterfacefeatureKey - 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)
LDReactorClientInterfaceintVariation in interface LDReactorClientInterfacefeatureKey - 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)
LDReactorClientInterfacedoubleVariation in interface LDReactorClientInterfacefeatureKey - 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)
LDReactorClientInterfacestringVariation in interface LDReactorClientInterfacefeatureKey - 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)
LDReactorClientInterfacejsonValueVariation in interface LDReactorClientInterfacefeatureKey - 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)
LDReactorClientInterfaceboolVariationDetail in interface LDReactorClientInterfacefeatureKey - 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)
LDReactorClientInterfaceintVariationDetail in interface LDReactorClientInterfacefeatureKey - 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)
LDReactorClientInterfacedoubleVariationDetail in interface LDReactorClientInterfacefeatureKey - 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)
LDReactorClientInterfacestringVariationDetail in interface LDReactorClientInterfacefeatureKey - 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)
LDReactorClientInterfacejsonValueVariationDetail in interface LDReactorClientInterfacefeatureKey - 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)
LDReactorClientInterfaceisFlagKnown in interface LDReactorClientInterfacefeatureKey - see linked reference.public FlagTracker getFlagTracker()
LDReactorClientInterfacegetFlagTracker in interface LDReactorClientInterfacepublic BigSegmentStoreStatusProvider getBigSegmentStoreStatusProvider()
LDReactorClientInterfaceLDClient.getBigSegmentStoreStatusProvider(). Getting the BigSegmentStoreStatusProvider is
not a blocking operation, but function calls on the BigSegmentStoreStatusProvider may be.getBigSegmentStoreStatusProvider in interface LDReactorClientInterfacepublic DataStoreStatusProvider getDataStoreStatusProvider()
LDReactorClientInterfaceLDClient.getDataStoreStatusProvider(). Getting the DataStoreStatusProvider is not a blocking
operation, but function calls on the DataStoreStatusProvider may be.getDataStoreStatusProvider in interface LDReactorClientInterfacepublic DataSourceStatusProvider getDataSourceStatusProvider()
LDReactorClientInterfaceLDClient.getDataSourceStatusProvider(). Getting the DataSourceStatusProvider is not a
blocking operation, but function calls on the DataSourceStatusProvider may be.getDataSourceStatusProvider in interface LDReactorClientInterfacepublic reactor.core.publisher.Mono<java.lang.Void> close()
LDReactorClientInterfaceLDClient.close().close in interface LDReactorClientInterfaceLDClient.close() completes.public void flush()
LDReactorClientInterfaceLDClient.flush().flush in interface LDReactorClientInterfacepublic boolean isOffline()
LDReactorClientInterfaceLDClient.isOffline().isOffline in interface LDReactorClientInterfacepublic java.lang.String secureModeHash(LDContext context)
LDReactorClientInterfacesecureModeHash in interface LDReactorClientInterfacecontext - see linked reference.public java.lang.String version()
LDReactorClientInterfaceLDClient.version().version in interface LDReactorClientInterface