Class LlmTokenCountCallbackHolder


  • public class LlmTokenCountCallbackHolder
    extends java.lang.Object
    A thread-safe holder for an instance of LlmTokenCountCallback. This class provides methods for setting and retrieving the callback instance.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.newrelic.api.agent.LlmTokenCountCallback getLlmTokenCountCallback()
      Retrieves the stored LlmTokenCountCallback instance.
      static void setLlmTokenCountCallback​(com.newrelic.api.agent.LlmTokenCountCallback newLlmTokenCountCallback)
      Sets the LlmTokenCountCallback instance to be stored.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LlmTokenCountCallbackHolder

        public LlmTokenCountCallbackHolder()
    • Method Detail

      • setLlmTokenCountCallback

        public static void setLlmTokenCountCallback​(com.newrelic.api.agent.LlmTokenCountCallback newLlmTokenCountCallback)
        Sets the LlmTokenCountCallback instance to be stored.
        Parameters:
        newLlmTokenCountCallback - the callback instance
      • getLlmTokenCountCallback

        public static com.newrelic.api.agent.LlmTokenCountCallback getLlmTokenCountCallback()
        Retrieves the stored LlmTokenCountCallback instance.
        Returns:
        stored callback instance