Package 

Class DefaultExportScheduler

  • All Implemented Interfaces:
    co.elastic.apm.android.sdk.features.persistence.scheduler.ExportScheduler , co.elastic.apm.android.sdk.internal.services.periodicwork.PeriodicTask

    
    public final class DefaultExportScheduler
     implements PeriodicTask, ExportScheduler
                        

    Default export scheduler that executes periodically while the app is running.

    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultExportScheduler(long minDelayBetweenExportsInMillis) Default export scheduler that executes periodically while the app is running.
    • Method Summary

      Modifier and Type Method Description
      void onPersistenceEnabled() This is called during the agent initialization when the persistence feature is enabled.
      void onPersistenceDisabled() This is called during the agent initialization when the persistence feature is disabled.It might be used to cancel previously scheduled periodic work when the feature was enabled.
      boolean shouldRunTask() Indicates whether this task should run as part of the ongoing PeriodicWorkService iterationor not.
      void runTask() Runs only if shouldRunTask returs true.
      boolean isTaskFinished() Indicates whether this task needs to keep running in future iterations or not.
      • Methods inherited from class co.elastic.apm.android.sdk.features.persistence.scheduler.ExportScheduler

        getDefault
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultExportScheduler

        DefaultExportScheduler(long minDelayBetweenExportsInMillis)
        Default export scheduler that executes periodically while the app is running.
        Parameters:
        minDelayBetweenExportsInMillis - - The minimum amount of time to wait until the nextexporting iteration.
    • Method Detail

      • onPersistenceEnabled

         void onPersistenceEnabled()

        This is called during the agent initialization when the persistence feature is enabled. Itshould be the place where any setup/initialization of the reading/exporting scheduling is done.

      • onPersistenceDisabled

         void onPersistenceDisabled()

        This is called during the agent initialization when the persistence feature is disabled.It might be used to cancel previously scheduled periodic work when the feature was enabled.

      • isTaskFinished

         boolean isTaskFinished()

        Indicates whether this task needs to keep running in future iterations or not.