Class FastThreadLocalStateCleaner

java.lang.Object
org.apache.pulsar.tests.FastThreadLocalStateCleaner

public final class FastThreadLocalStateCleaner extends Object
Cleanup Thread Local state attach to Netty's FastThreadLocal. This is not thread-safe, but that aspect is ignored.
  • Constructor Details

    • FastThreadLocalStateCleaner

      public FastThreadLocalStateCleaner(Predicate<Object> valueFilter)
  • Method Details

    • cleanupAllFastThreadLocals

      public void cleanupAllFastThreadLocals(Thread thread, BiConsumer<Thread,Object> cleanedValueListener)
    • cleanupAllFastThreadLocals

      public void cleanupAllFastThreadLocals(BiConsumer<Thread,Object> cleanedValueListener)
    • isEnabled

      public static boolean isEnabled()