Show / Hide Table of Contents

Interface IEventProcessor

Interface for an object that can send or store analytics events.

Namespace: LaunchDarkly.Sdk.Client.Subsystems
Assembly: LaunchDarkly.ClientSdk.dll
Syntax
public interface IEventProcessor : IDisposable
Remarks

Application code normally does not need to interact with IEventProcessor or its related parameter types. They are provided to allow a custom implementation or test fixture to be substituted for the SDK's normal analytics event logic.

All of the Record methods must return as soon as possible without waiting for events to be delivered; event delivery is done asynchronously by a background task.

Methods

Flush()

Specifies that any buffered events should be sent as soon as possible.

Declaration
void Flush()
See Also
Flush()

FlushAndWait(TimeSpan)

Delivers any pending analytics events synchronously now.

Declaration
bool FlushAndWait(TimeSpan timeout)
Parameters
Type Name Description
System.TimeSpan timeout

the maximum time to wait

Returns
Type Description
System.Boolean

true if completed, false if timed out

See Also
FlushAndWait(System.TimeSpan)

FlushAndWaitAsync(TimeSpan)

Delivers any pending analytics events now, returning a Task that can be awaited.

Declaration
Task<bool> FlushAndWaitAsync(TimeSpan timeout)
Parameters
Type Name Description
System.TimeSpan timeout

the maximum time to wait

Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

a Task that resolves to true if completed, false if timed out

See Also
FlushAndWaitAsync(System.TimeSpan)

RecordCustomEvent(EventProcessorTypes.CustomEvent)

Records a custom event.

Declaration
void RecordCustomEvent(in EventProcessorTypes.CustomEvent e)
Parameters
Type Name Description
EventProcessorTypes.CustomEvent e

parameters for a custom event

RecordEvaluationEvent(EventProcessorTypes.EvaluationEvent)

Records the action of evaluating a feature flag.

Declaration
void RecordEvaluationEvent(in EventProcessorTypes.EvaluationEvent e)
Parameters
Type Name Description
EventProcessorTypes.EvaluationEvent e

parameters for an evaluation event

Remarks

Depending on the feature flag properties and event properties, this may be transmitted to the events service as an individual event, or may only be added into summary data.

RecordIdentifyEvent(EventProcessorTypes.IdentifyEvent)

Records a set of user properties.

Declaration
void RecordIdentifyEvent(in EventProcessorTypes.IdentifyEvent e)
Parameters
Type Name Description
EventProcessorTypes.IdentifyEvent e

parameters for an identify event

SetOffline(Boolean)

Puts the component into offline mode if appropriate.

Declaration
void SetOffline(bool offline)
Parameters
Type Name Description
System.Boolean offline

true if the SDK has been put offline

In This Article
Back to top Generated by DocFX