Class RuleKeyHasher

java.lang.Object
com.helix.core.cache.l4.RuleKeyHasher

public final class RuleKeyHasher extends Object
Deterministic SHA-256 key generator for compiled rules across distributed cluster nodes.
  • Method Details

    • hashRule

      public static String hashRule(String ruleContent)
      Computes a deterministic SHA-256 hash for the given rule content.
      Parameters:
      ruleContent - raw rule JSON or expression string
      Returns:
      64-character lowercase hexadecimal SHA-256 hash
    • hashRule

      public static String hashRule(String ruleContent, String engineVersion)
      Computes a deterministic SHA-256 hash incorporating the engine build version. This prevents incompatible bytecode from being loaded if the engine compiler evolves.
      Parameters:
      ruleContent - raw rule JSON or expression string
      engineVersion - engine compiler version
      Returns:
      64-character lowercase hexadecimal SHA-256 hash