Interface AnalyticsExporter
public interface AnalyticsExporter
An
AnalyticsExporter
is responsible for exporting analytics beans
to a destination. Exporters are registered with a channel name and
AnalyticsServer
will call the exporter with beans to export based
on events, timers and policy implemented in the core service. The exporter
simply needs to export the data and indicate whether it was successful or
not. If successful, the beans will be deleted from the device. If not
successful, the beans will remain cached locally and will be sent to the
exporter again in the future to retry the export.- Since:
- 1.0
- Version:
- 2024-03-19
-
Method Summary
Modifier and TypeMethodDescriptionvoid
exportAnalytics
(String channel, List<AnalyticsExportBean> beans) Export the list of analytics beans associated with the specified channel.default int
getAnalyticsPriorityDelay
(String channel, AnalyticsPriority priority) Given an analytics priority, return how long the service should hold data before triggering a call to export.default int
getMaxAnalyticsSize
(String channel) Return the max size of data the exporter can handle in a single export call.default int
getMinAnalyticsSize
(String channel) Return the minimum amount of data the exporter requires.
-
Method Details
-
exportAnalytics
Export the list of analytics beans associated with the specified channel. A successful return implies the analytics were sent and that the data should be purged from the device. Throw an exception to indicate that the export failed. This will preserve the data and trigger a periodic retry.- Parameters:
channel
- the channel being exportedbeans
- the beans to export- Throws:
Exception
-
getMaxAnalyticsSize
Return the max size of data the exporter can handle in a single export call. A value of zero indicates there is no constraint and the service defaults should be used.- Parameters:
channel
- the channel being exported
-
getMinAnalyticsSize
Return the minimum amount of data the exporter requires. This can be used to reduce the amount of traffic the exporter generates by asking the analytics service to hold data even when priorities indicate that it should send.When set and an export attempt was aborted due to not enough data, standard priority timings no longer occur. The channel will be tagged as pending and a standard retry timer will be used until the data is exported.
- Parameters:
channel
- the channel being exported
-
getAnalyticsPriorityDelay
Given an analytics priority, return how long the service should hold data before triggering a call to export. A value of zero indicates that service defaults should be used.- Parameters:
channel
- the channel being exportedpriority
- the priority to return the delay for
-