Class AnalyticsClient

All Implemented Interfaces:
CtxEventListener, ContextHandleAware, HandleAware, Ready, ReadyListener, AnalyticsService

public class AnalyticsClient extends AbstractService implements AnalyticsService
Implementation of AnalyticsService for use on non-primary nodes. This will capture events on the local node and then forward them to the primary node for final processing.
Since:
1.0
Version:
2024-03-12
  • Method Details

    • recordAsync

      public void recordAsync(AnalyticsEvent event)
      Description copied from interface: AnalyticsService
      Record an analytics event by putting it into a queue so that a background thread can perform data serialization and database writes decoupled from the calling thread. Care should be taken when providing live data as it can change between the call to queue the data and when the background thread serializes it. This method is intended for low latency code paths.
      Specified by:
      recordAsync in interface AnalyticsService
      Parameters:
      event - the event to record
    • record

      public void record(AnalyticsEvent event)
      Description copied from interface: AnalyticsService
      Record an analytics event. This will perform all event processing in the calling thread. Normally this is nominal overhead, but for particularly time sensitive use cases use recordAsync() which queues the event to be recorded by a background thread.
      Specified by:
      record in interface AnalyticsService
      Parameters:
      event - the event to record