Module bus.limiter

Class Holder

java.lang.Object
org.miaixz.bus.limiter.Holder

public class Holder extends Object
Global context holder for the limiter module. This class provides static methods to set and retrieve the Context object, making it accessible throughout the application.
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • Holder

      public Holder()
  • Method Details

    • set

      public static void set(Context context)
      Sets the global Context instance. This method should typically be called once during application initialization.
      Parameters:
      context - The Context object to be set as the global instance.
    • load

      public static Context load()
      Retrieves the global Context instance.
      Returns:
      The currently set global Context object.