Class AnalyticsServer
- All Implemented Interfaces:
CtxEventListener
,ContextHandleAware
,HandleAware
,Ready
,ReadyAndReadyListener
,ReadyListener
Analytic events, whether originating on this node or any other node, are recorded in
separate channels as identified by user provided classifiers. A classifier simply
need to implement the AnalyticsClassifier
interface and be added to the
context to be autowired into this service. Once connected, the classifier starts
receiving events to classify. Every channel returned by the classifier for a given
event will result in a copy of the event being recorded in the corresponding channel.
Classifiers only receive new events, not events that have occurred before the
classifier existed.
Users can register exporters in the form of AnalyticsExporter
, with one or
more channels. The analytics service will periodically group events from a channel
together and send them to an exporter to be processed (uploaded to the cloud for
example). The service will manage durability of the events until they are uploaded
or the channel reaches size / date limits. Only one exporter can be registered per
channel.
- Since:
- 1.0
- Version:
- 2024-03-12
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
Flush the contents of a channel.void
record
(AnalyticsEvent event) Deprecated.void
register
(String channel, AnalyticsExporter exporter) Register an exporter for a channel.void
unregister
(String channel, AnalyticsExporter exporter) Unregister an exporter from a channel.Methods inherited from class com.tccc.kos.commons.core.service.AbstractService
getHandle, getHandlePrefix
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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.ReadyAndReadyListener
onBeanReady, onDependenciesReady
Methods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener
onDependenciesGroupReady
-
Field Details
-
DEFAULT_CHANNEL
- See Also:
-
DEFAULT_MAX_SIZE
public static final int DEFAULT_MAX_SIZE- See Also:
-
-
Method Details
-
record
Deprecated.To be removed from SDK. UseAnalyticsService.record()
instead. -
register
Register an exporter for a channel. -
unregister
Unregister an exporter from a channel. -
flush
Flush the contents of a channel. This causes the associated exporter to be called immediately with any pending analytic events.
-