Class AnalyticsClient
java.lang.Object
com.tccc.kos.commons.util.ready.ReadyBean
com.tccc.kos.commons.core.service.AbstractService
com.tccc.kos.core.service.analytics.client.AnalyticsClient
- All Implemented Interfaces:
CtxEventListener
,ContextHandleAware
,HandleAware
,Ready
,ReadyListener
,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 Summary
Modifier and TypeMethodDescriptionvoid
record
(AnalyticsEvent event) Record an analytics event.void
recordAsync
(AnalyticsEvent event) 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.Methods inherited from class com.tccc.kos.commons.core.service.AbstractService
getHandle, getHandlePrefix
Methods inherited from class com.tccc.kos.commons.util.ready.ReadyBean
getReady, onBeanReady, onDependenciesReady
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tccc.kos.core.service.analytics.AnalyticsService
record, recordAsync, recordHigh, recordHigh, recordLow, recordLow, recordMedium, recordMedium
Methods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener
onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompleted
Methods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPath
Methods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener
onDependenciesGroupReady
-
Method Details
-
recordAsync
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 interfaceAnalyticsService
- Parameters:
event
- the event to record
-
record
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 userecordAsync()
which queues the event to be recorded by a background thread.- Specified by:
record
in interfaceAnalyticsService
- Parameters:
event
- the event to record
-