Class LabelUtils

java.lang.Object
org.axonframework.deadline.jobrunr.LabelUtils

public abstract class LabelUtils extends Object
Utility to create labels for use with JobRunr. As labels have a maximum length of 44, we hash a label whenever it exceeds the maximum length.
Since:
4.8.0
Author:
Gerard Klijs
  • Method Details

    • getLabel

      public static String getLabel(String input)
      Makes sure the returned value has a length equal or the same as the maximum size.
      Parameters:
      input - the input to get a valid label for
      Returns:
      a String which can be used as a label
    • getCombinedLabel

      public static String getCombinedLabel(@Nonnull Serializer serializer, @Nonnull String deadlineName, @Nonnull ScopeDescriptor scope)
      Creates a label from a scope and a deadlineName, by using the serializer.
      Parameters:
      serializer - a Serializer to serialize the provided scope
      deadlineName - the String that holds the deadline name.
      scope - scope a ScopeDescriptor of which a label is needed
      Returns:
      a String which can be used as a label