public class ThreadService extends AbstractService implements ThreadNames
Modifier and Type | Class and Description |
---|---|
static interface |
ThreadService.AgentThread
A marker to identify agent threads.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME_PATTERN_CFG_KEY |
logger
Constructor and Description |
---|
ThreadService() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
java.util.Set<java.lang.Long> |
getAgentThreadIds()
Get the IDs of threads owned by the agent.
|
java.lang.String |
getThreadName(BasicThreadInfo threadInfo) |
ThreadNameNormalizer |
getThreadNameNormalizer() |
boolean |
isAgentThreadId(java.lang.Long threadId) |
boolean |
isCurrentThreadAnAgentThread() |
boolean |
isEnabled()
Is the service enabled.
|
void |
registerAgentThreadId(long id)
Add the id of an agent thread.
|
getLogger, getName, isStarted, isStartedOrStarting, isStopped, isStoppedOrStopping, start, stop
public static final java.lang.String NAME_PATTERN_CFG_KEY
protected void doStart() throws java.lang.Exception
doStart
in class AbstractService
java.lang.Exception
protected void doStop() throws java.lang.Exception
doStop
in class AbstractService
java.lang.Exception
public boolean isEnabled()
Service
public boolean isCurrentThreadAnAgentThread()
public boolean isAgentThreadId(java.lang.Long threadId)
public ThreadNameNormalizer getThreadNameNormalizer()
public java.lang.String getThreadName(BasicThreadInfo threadInfo)
getThreadName
in interface ThreadNames
public java.util.Set<java.lang.Long> getAgentThreadIds()
public void registerAgentThreadId(long id)