Interface ReindexingRule

All Known Implementing Classes:
AbstractReindexingRule, ReindexingDataSchemaRule, ReindexingDeletionRule, ReindexingIndexSpecRule, ReindexingPartitioningRule

public interface ReindexingRule
Defines a reindexing configuration that applies to data based on age thresholds.

Rules encapsulate specific aspects of reindexing (granularity, filters, tuning, etc.) and specify when they should apply via a Period which defines the age threshold for applicability.

Rules conditionally apply to data "older than" the rules threshold relative to the time of rule evaluation.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Indicates how a rule applies to a given time interval based on the rule's period threshold.
  • Method Summary

    Modifier and Type
    Method
    Description
    appliesTo(org.joda.time.Interval interval, org.joda.time.DateTime referenceTime)
    Check if this rule applies to the given interval.
    Provides a human-readable description of the rule, which can be used for logging, debugging, or user interfaces to explain the purpose and behavior of the rule.
    Provides an identifier for the rule, which can be used for referencing, logging, or management purposes.
    org.joda.time.Period
    Defines the age threshold for rule applicability.
  • Method Details

    • getId

      String getId()
      Provides an identifier for the rule, which can be used for referencing, logging, or management purposes.

      Note that there is no inherent contract for uniqueness across rule sets provided by this interface.

    • getDescription

      String getDescription()
      Provides a human-readable description of the rule, which can be used for logging, debugging, or user interfaces to explain the purpose and behavior of the rule.
    • getOlderThan

      org.joda.time.Period getOlderThan()
      Defines the age threshold for rule applicability. The rule applies to data older than a reference time minus this period.

      For example, if the period is "P30D" (30 days) and the reference time is "2024-01-31T00:00:00Z", the rule applies to data older than "2024-01-01T00:00:00Z".

      Returns:
      The period representing the age threshold for rule applicability.
    • appliesTo

      ReindexingRule.AppliesToMode appliesTo(org.joda.time.Interval interval, @Nullable org.joda.time.DateTime referenceTime)
      Check if this rule applies to the given interval.

      Parameters:
      interval - The interval to check applicability against.
      referenceTime - The reference time to use for period calculations. null results in using current UTC instant at runtime.
      Returns:
      The applicability mode of the rule for the given interval and reference time.