Class Event
- java.lang.Object
-
- com.launchdarkly.sdk.internal.events.Event
-
- Direct Known Subclasses:
Event.Custom
,Event.FeatureRequest
,Event.Identify
,Event.Index
,Event.MigrationOp
public class Event extends java.lang.Object
Base class for all analytics events that are generated by the client. Also defines all of its own subclasses.These types are not visible to applications; they are an implementation detail of the default event processor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Event.Custom
A custom event created with one of the SDK'strack
methods.static class
Event.FeatureRequest
An event generated by a feature flag evaluation.static class
Event.Identify
An event created with the SDK'sidentify
method (or generated automatically at startup if it is a client-side SDK).static class
Event.Index
An event created internally by the SDK to hold user data that may be referenced by multiple events.static class
Event.MigrationOp
An event generated by a migration operation.
-
Constructor Summary
Constructors Constructor Description Event(long creationDate, com.launchdarkly.sdk.LDContext context)
Base event constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.launchdarkly.sdk.LDContext
getContext()
The context associated with the event.long
getCreationDate()
The event timestamp.long
getSamplingRatio()
Ratio used for sampling the event.
-
-
-
Method Detail
-
getCreationDate
public long getCreationDate()
The event timestamp.- Returns:
- the timestamp in milliseconds
-
getContext
public com.launchdarkly.sdk.LDContext getContext()
The context associated with the event.- Returns:
- the context object
-
getSamplingRatio
public long getSamplingRatio()
Ratio used for sampling the event. The default sampling ratio is 1.Currently, sampling applies to feature, debug, and migration events.
- Returns:
- the sampling ratio
-
-