Interface DataManager

  • All Implemented Interfaces:
    com.pointrlabs.core.management.interfaces.Advertiser

    
    public interface DataManager
     implements Advertiser<DataManager.Listener>
                        

    Main manager class responsible for all the data management.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface DataManager.Listener
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit loadDataForSite(Site site) Starts data management for given site if data is not already present
      abstract Unit loadDataForSite(Site site, Boolean shouldRespectCachePolicy) Starts management for given site if data is not already present
      abstract Unit waitUntilDone() To be used if third party wants to wait for data management to finish synchronously.
      abstract Boolean isSiteContentReady(Site site) Checks whether all data is ready for use for given site
      abstract Unit handleMapViewLevelChange(Integer level) Tries to optimize map downloads according to level.
      abstract Boolean isRunning() Returns true if there are data type being processed at the moment by the manager
      • Methods inherited from class com.pointrlabs.core.management.interfaces.Advertiser

        addListener, removeListener
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • loadDataForSite

         abstract Unit loadDataForSite(Site site)

        Starts data management for given site if data is not already present

        Parameters:
        site - to start data management
      • loadDataForSite

         abstract Unit loadDataForSite(Site site, Boolean shouldRespectCachePolicy)

        Starts management for given site if data is not already present

        Parameters:
        site - to start data management
        shouldRespectCachePolicy - if set to true -> will wait until the cache expires if data is already present if set to false -> ignores the internal cache and triggers data update
      • waitUntilDone

         abstract Unit waitUntilDone()

        To be used if third party wants to wait for data management to finish synchronously. The calling thread will be blocked by this call, until the data management for all ongoing sites are finished

      • handleMapViewLevelChange

         abstract Unit handleMapViewLevelChange(Integer level)

        Tries to optimize map downloads according to level.

        Parameters:
        level - level that is opened by user
      • isRunning

         abstract Boolean isRunning()

        Returns true if there are data type being processed at the moment by the manager