Class SurveySchedule

java.lang.Object
org.odpi.openmetadata.adapters.connectors.liskov.SurveySchedule

public class SurveySchedule extends Object
Decides whether a survey of a data store is due.

A data store that has never been surveyed is surveyed straight away. After that, the interval between surveys starts at the minimum interval and grows by a day each time a survey finds no change since the survey before it, up to the maximum interval. As soon as a survey finds a change, the interval drops back to the minimum and the cycle repeats. With the default limits, a data store that keeps changing is surveyed daily, and one that has stopped changing is surveyed after 1 day, then 2, then 3 and so on up to once a week.

Nothing about the schedule is stored. It is worked out from the survey history each time it is needed, so it survives a restart of the integration daemon. The history is only consulted when the answer depends on it - never before the minimum interval has passed, never once the maximum has, and otherwise only as far back as the time since the latest survey requires.
  • Field Details

    • DEFAULT_MINIMUM_INTERVAL_DAYS

      public static final int DEFAULT_MINIMUM_INTERVAL_DAYS
      The default minimum number of days between surveys.
      See Also:
    • DEFAULT_MAXIMUM_INTERVAL_DAYS

      public static final int DEFAULT_MAXIMUM_INTERVAL_DAYS
      The default maximum number of days between surveys.
      See Also:
  • Constructor Details

    • SurveySchedule

      public SurveySchedule(int minimumIntervalDays, int maximumIntervalDays)
      Constructor. A negative minimum is treated as zero, and a maximum below the minimum as the minimum.
      Parameters:
      minimumIntervalDays - fewest days between surveys
      maximumIntervalDays - most days between surveys
  • Method Details