Class AdLifecycleData
-
- All Implemented Interfaces:
public final class AdLifecycleDataData class for tracking timing metrics throughout the ad lifecycle.
This class maintains timestamps for various key events in the ad lifecycle, using SystemClock.elapsedRealtime to ensure consistent timing measurements that are unaffected by system clock changes. These metrics are used for performance analysis and latency tracking.
-
-
Field Summary
Fields Modifier and Type Field Description private final LongloadCalledTimeStampprivate final LongadLoadProcessStartEventprivate final LongmuttLatencyTimeStampprivate final LongshowLatencyTimeStampprivate final LongrenderLatencyTimeStampprivate final LongparseLatencyTimeStampprivate final LongloadSuccessLatencyTimeStampprivate final LongadExpiryTimeStamp
-
Constructor Summary
Constructors Constructor Description AdLifecycleData()
-
Method Summary
Modifier and Type Method Description final LonggetLoadCalledTimeStamp()Timestamp when ad load was initially called. final LonggetAdLoadProcessStartEvent()Timestamp when the ad loading process actually started. final LonggetMuttLatencyTimeStamp()Timestamp when the ad fetch worker was started. final LonggetShowLatencyTimeStamp()Timestamp when show() method was called. final LonggetRenderLatencyTimeStamp()Timestamp when ad rendering completed successfully. final LonggetParseLatencyTimeStamp()Timestamp when ad parsing started. final LonggetLoadSuccessLatencyTimeStamp()Timestamp when ad loading completed successfully. final LonggetAdExpiryTimeStamp()final UnitonLoadCalledEvent()Records the timestamp when the ad load method was called by the publisher. final UnitonAdLoadProcessStartEvent()Records the timestamp when the internal ad loading process actually started. final UnitonLoadSuccess()Records the timestamp when ad loading completed successfully. final UnitonStartAdFetchWorker()Records the timestamp when the ad fetch worker was started. final UnitonShowCalled()Records the timestamp when the show method was called. final UnitonRenderSuccess()Records the timestamp when ad rendering completed successfully. final UnitonParseStart()Records the timestamp when ad content parsing started. final BooleanisAdExpired()final UnitsetAdExpiryTimeStamp(Long adExpiryTimeStamp)Sets the ad expiry timestamp based on the provided value. -
-
Method Detail
-
getLoadCalledTimeStamp
final Long getLoadCalledTimeStamp()
Timestamp when ad load was initially called.
-
getAdLoadProcessStartEvent
final Long getAdLoadProcessStartEvent()
Timestamp when the ad loading process actually started.
-
getMuttLatencyTimeStamp
final Long getMuttLatencyTimeStamp()
Timestamp when the ad fetch worker was started.
-
getShowLatencyTimeStamp
final Long getShowLatencyTimeStamp()
Timestamp when show() method was called.
-
getRenderLatencyTimeStamp
final Long getRenderLatencyTimeStamp()
Timestamp when ad rendering completed successfully.
-
getParseLatencyTimeStamp
final Long getParseLatencyTimeStamp()
Timestamp when ad parsing started.
-
getLoadSuccessLatencyTimeStamp
final Long getLoadSuccessLatencyTimeStamp()
Timestamp when ad loading completed successfully.
-
getAdExpiryTimeStamp
final Long getAdExpiryTimeStamp()
-
onLoadCalledEvent
final Unit onLoadCalledEvent()
Records the timestamp when the ad load method was called by the publisher.
This marks the beginning of the ad loading process from the publisher's perspective and is used to measure total load latency.
-
onAdLoadProcessStartEvent
final Unit onAdLoadProcessStartEvent()
Records the timestamp when the internal ad loading process actually started.
This may differ from onLoadCalledEvent as there might be preprocessing or queuing before the actual loading begins. Used to measure internal processing delays.
-
onLoadSuccess
final Unit onLoadSuccess()
Records the timestamp when ad loading completed successfully.
This marks the end of the ad loading process and is used in conjunction with loadCalledTimeStamp to calculate total load latency.
-
onStartAdFetchWorker
final Unit onStartAdFetchWorker()
Records the timestamp when the ad fetch worker was started.
This tracks when the background worker responsible for fetching ad content from the network was initiated. Used for measuring network fetch latency.
-
onShowCalled
final Unit onShowCalled()
Records the timestamp when the show method was called.
This marks when the publisher requested to display the ad and is used to measure the time between load completion and show request.
-
onRenderSuccess
final Unit onRenderSuccess()
Records the timestamp when ad rendering completed successfully.
This marks when the ad has been fully rendered and is visible to the user. Used to measure rendering latency and time-to-display metrics.
-
onParseStart
final Unit onParseStart()
Records the timestamp when ad content parsing started.
This tracks when the SDK begins parsing the received ad response to extract creative content and metadata. Used for measuring parsing performance.
-
isAdExpired
final Boolean isAdExpired()
-
setAdExpiryTimeStamp
final Unit setAdExpiryTimeStamp(Long adExpiryTimeStamp)
Sets the ad expiry timestamp based on the provided value.
-
-
-
-