Class AnalyticsServer
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
- Version:
- 1
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidFlush the contents of a channel.voidrecord(AnalyticsEvent event) Deprecated.voidregister(String channel, AnalyticsExporter exporter) Register an exporter for a channel.voidunregister(String channel, AnalyticsExporter exporter) Unregister an exporter from a channel.
-
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. UseAnalyticsServicerecord() method instead. -
register
Register an exporter for a channel.- Since:
- 1
-
unregister
Unregister an exporter from a channel.- Since:
- 1
-
flush
Flush the contents of a channel. This causes the associated exporter to be called immediately with any pending analytic events.- Since:
- 1
-