java.lang.Object
net.shibboleth.utilities.java.support.primitive.TimerSupport

public final class TimerSupport
extends Object
Timer utility methods.
  • Constructor Details

    • TimerSupport

      private TimerSupport()
      Constructor.
  • Method Details

    • getTimerName

      @Nonnull @NotEmpty public static String getTimerName​(@Nonnull Object obj)
      Produce the name which should be used for a Timer owned by the specified object.

      The base name will be constructed as follows:

      Parameters:
      obj - the target object instance to evaluate
      Returns:
      an appropriate name for a Timer owned by the specified object
    • getTimerName

      @Nonnull @NotEmpty public static String getTimerName​(@Nonnull Object obj, @Nullable String additionalData)
      Produce the name which should be used for a Timer owned by the specified object.

      The base name will be constructed as follows:

      Parameters:
      obj - the target object instance to evaluate
      additionalData - additional qualifying data to include in the name
      Returns:
      an appropriate name for a Timer owned by the specified object
    • getTimerName

      @Nonnull @NotEmpty public static String getTimerName​(@Nonnull String baseName, @Nullable String additionalData)
      Produce the name for a Timer based on the specified base name.
      Parameters:
      baseName - the base name of Timer
      additionalData - additional qualifying data to include in the name
      Returns:
      an appropriate name for a Timer based on the specified base name
    • uncheckedGetTimerName

      @Nonnull @NotEmpty private static String uncheckedGetTimerName​(@Nonnull String baseName, @Nullable String additionalData)
      Unchecked version of getTimerName(String, String) that assumes base name is non-null.
      Parameters:
      baseName - the base name of Timer
      additionalData - additional qualifying data to include in the name
      Returns:
      an appropriate name for a Timer based on the specified base name