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 TypeMethodDescriptionvoidrecord(AnalyticsEvent event) Record an analytics event.voidrecordAsync(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, getHandlePrefixMethods inherited from class com.tccc.kos.commons.util.ready.ReadyBean
getReady, onBeanReady, onDependenciesReadyMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tccc.kos.core.service.analytics.AnalyticsService
record, recordAsync, recordHigh, recordHigh, recordLow, recordLow, recordMedium, recordMediumMethods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener
onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompletedMethods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPathMethods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener
onDependenciesGroupReady
-
Method Details
-
recordAsync
Description copied from interface:AnalyticsServiceRecord 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:
recordAsyncin interfaceAnalyticsService- Parameters:
event- the event to record
-
record
Description copied from interface:AnalyticsServiceRecord 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:
recordin interfaceAnalyticsService- Parameters:
event- the event to record
-