Class ChangeRequestHttpSyncer<T>

    • Field Detail

    • Constructor Detail

      • ChangeRequestHttpSyncer

        public ChangeRequestHttpSyncer​(com.fasterxml.jackson.databind.ObjectMapper smileMapper,
                                       org.apache.druid.java.util.http.client.HttpClient httpClient,
                                       ScheduledExecutorService executor,
                                       URL baseServerURL,
                                       String baseRequestPath,
                                       com.fasterxml.jackson.core.type.TypeReference<ChangeRequestsSnapshot<T>> responseTypeReferences,
                                       long serverTimeoutMS,
                                       long serverUnstabilityTimeout,
                                       ChangeRequestHttpSyncer.Listener<T> listener)
    • Method Detail

      • start

        public void start()
      • stop

        public void stop()
      • isInitialized

        public boolean isInitialized()
        Whether this server has been synced successfully at least once.
      • getDebugInfo

        public Map<String,​Object> getDebugInfo()
        Returns debugging information for printing, must not be used for any other purpose.
      • needsReset

        public boolean needsReset()
        Whether this syncer should be reset. This method returning true typically indicates a problem with the sync scheduler.
        Returns:
        true if the delay since the last request to the server (or since syncer start in case of no request to the server) has exceeded maxDelayBetweenSyncRequests.
      • getUnstableTimeMillis

        public long getUnstableTimeMillis()
      • isSyncedSuccessfully

        public boolean isSyncedSuccessfully()
        Returns:
        true if there have been no sync failures recently and the last successful sync was not more than maxDurationToWaitForSync ago.
      • isExecutorShutdown

        public boolean isExecutorShutdown()