Package org.apache.bookkeeper.stats
Class ThreadRegistry
- java.lang.Object
-
- org.apache.bookkeeper.stats.ThreadRegistry
-
public class ThreadRegistry extends java.lang.Object
For mapping thread ids to thread pools and threads within those pools or just for lone named threads. Thread scoped metrics add labels to metrics by retrieving the ThreadPoolThread object from this registry. For flexibility, this registry is not based on TLS.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ThreadRegistry.ThreadPoolThread
Stores the thread pool and ordinal.
-
Constructor Summary
Constructors Constructor Description ThreadRegistry()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
clear()
static ThreadRegistry.ThreadPoolThread
get()
static void
register(java.lang.String threadPool, int threadPoolThread)
static void
register(java.lang.String threadPool, int threadPoolThread, long threadId)
-
-
-
Method Detail
-
register
public static void register(java.lang.String threadPool, int threadPoolThread)
-
register
public static void register(java.lang.String threadPool, int threadPoolThread, long threadId)
-
clear
public static void clear()
-
get
public static ThreadRegistry.ThreadPoolThread get()
-
-