Class LifecyclePolicyUtils

java.lang.Object
org.elasticsearch.xpack.core.ilm.LifecyclePolicyUtils

public class LifecyclePolicyUtils extends Object
A utility class used for index lifecycle policies
  • Method Details

    • loadPolicy

      public static LifecyclePolicy loadPolicy(String name, String resource, Map<String,String> variables, org.elasticsearch.xcontent.NamedXContentRegistry xContentRegistry)
      Loads a built-in index lifecycle policy and returns its source.
    • parsePolicy

      public static LifecyclePolicy parsePolicy(String rawPolicy, String name, org.elasticsearch.xcontent.NamedXContentRegistry xContentRegistry, org.elasticsearch.xcontent.XContentType contentType) throws IOException
      Parses lifecycle policy based on the provided content type without doing any variable substitution. It is caller's responsibility to do any variable substitution if required.
      Throws:
      IOException
    • replaceVariable

      public static String replaceVariable(String input, String variable, String value)
      Replaces all occurrences of given variable with the value