Class HelixEnvironmentHolder

java.lang.Object
com.helixframework.env.HelixEnvironmentHolder

@Component public class HelixEnvironmentHolder extends Object
HelixEnvironmentHolder is a component that holds a static reference to a HelixEnvironment instance. This allows the HelixEnvironment to be accessed globally within the application.
  • Constructor Details

    • HelixEnvironmentHolder

      public HelixEnvironmentHolder(HelixEnvironment env)
      Constructs a HelixEnvironmentHolder with the specified HelixEnvironment.
      Parameters:
      env - the HelixEnvironment instance to be held statically
  • Method Details

    • get

      public static HelixEnvironment get()
      Retrieves the current instance of HelixEnvironment held by the HelixEnvironmentHolder.
      Returns:
      the statically held HelixEnvironment instance