Class AddressLocatingPollingTask

    • Constructor Detail

      • AddressLocatingPollingTask

        public AddressLocatingPollingTask()
    • Method Detail

      • execute

        protected long execute()
                        throws Throwable
        Description copied from class: SimplePollingTask
        Executes the task batch. This method must be idempotent, which means that subsequent invocations should not cause side effects. For example, a task could expire data up to the current hour. If executed several times within any given hour, only the first execution should change data, while others should not affect anything. Should return the number of affected records
        Specified by:
        execute in class SimplePollingTask
        Throws:
        Throwable
      • findMapEnabledConfigurations

        protected List<Long> findMapEnabledConfigurations()
        Returns the ids of all configurations with map enabled and a valid server API key
      • isRunInTransaction

        protected boolean isRunInTransaction()
        Description copied from class: SimplePollingTask
        Return whether the execute method must be ran in a transaction or not. By default a transaction is opened before execute the method.
        Overrides:
        isRunInTransaction in class SimplePollingTask
      • geocode

        protected boolean geocode​(Long id)
        Locates a single address
      • markAsGeocodeFailed

        protected void markAsGeocodeFailed​(Long id)
        Marks a single address as geocoding failed
      • nextBatch

        protected List<Long> nextBatch​(List<Long> configurationIds)
        Returns a list of address ids which are not yet localized