Top Fields Constructors Methods
io.vertx.core.impl.btc

public Class BlockedThreadChecker

extends Object
Class Inheritance
Imports
io.vertx.core.Handler, .VertxException, io.vertx.core.impl.logging.Logger, .LoggerFactory, java.util.ArrayList, .List, .Map, .Timer, .TimerTask, .WeakHashMap, java.util.concurrent.TimeUnit

Author
Tim Fox

Field Summary

Modifier and TypeField and Description
private Handler<BlockedThreadEvent>
private static final Logger
public static final String
private final Map<Thread, ThreadInfo>
private final Timer

Constructor Summary

AccessConstructor and Description
public
BlockedThreadChecker(long interval, TimeUnit intervalUnit, long warningExceptionTime, TimeUnit warningExceptionTimeUnit)

Method Summary

Modifier and TypeMethod and Description
public void
private static void
public synchronized void
registerThread(Thread thread, ThreadInfo checked)

public synchronized void
setThreadBlockedHandler(Handler<BlockedThreadEvent>
The handler to run
handler
)

Specify the handler to run when it is determined a thread has been blocked for longer than allowed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

blockedThreadHandlerback to summary
private Handler<BlockedThreadEvent> blockedThreadHandler
logback to summary
private static final Logger log
LOGGER_NAMEback to summary
public static final String LOGGER_NAME
threadsback to summary
private final Map<Thread, ThreadInfo> threads
timerback to summary
private final Timer timer

Constructor Detail

BlockedThreadCheckerback to summary
public BlockedThreadChecker(long interval, TimeUnit intervalUnit, long warningExceptionTime, TimeUnit warningExceptionTimeUnit)

Method Detail

closeback to summary
public void close()
defaultBlockedThreadHandlerback to summary
private static void defaultBlockedThreadHandler(BlockedThreadEvent bte)
registerThreadback to summary
public synchronized void registerThread(Thread thread, ThreadInfo checked)
setThreadBlockedHandlerback to summary
public synchronized void setThreadBlockedHandler(Handler<BlockedThreadEvent> handler)

Specify the handler to run when it is determined a thread has been blocked for longer than allowed. Note that the handler will be called on the blocked thread checker thread, not an event loop thread.

Parameters
handler:Handler<BlockedThreadEvent>

The handler to run