Class UriTrigger

java.lang.Object
com.arpnetworking.configuration.triggers.UriTrigger
All Implemented Interfaces:
Trigger

public final class UriTrigger extends Object implements Trigger
Trigger implementation based on a uri's last modified date and ETag. Either can trigger a reload; the last modified if is later than the previous value or the ETag if it differs from the previous value. If the uri is unavailable it is not considered changed to prevent flickering caused by connectivity or server issues.
Author:
Ville Koskela (ville dot koskela at inscopemetrics dot io)
  • Method Details

    • evaluateAndReset

      public boolean evaluateAndReset()
      Description copied from interface: Trigger
      Evaluate the trigger. True indicates the trigger has been tripped. Evaluating the trigger will reset its state and the trigger will not return true again until it is tripped again.
      Specified by:
      evaluateAndReset in interface Trigger
      Returns:
      True if and only if the trigger has been tripped.
    • toLogValue

      public Object toLogValue()
      Generate a Steno log compatible representation.
      Returns:
      Steno log compatible representation.
    • toString

      public String toString()
      Overrides:
      toString in class Object