public class Deadline extends Object
Modifier and Type | Method and Description |
---|---|
static void |
checkTimeout()
Check whether the long running method timeout.
|
static void |
clear()
remove the registered Deadline threadlocal object from current thread.
|
static void |
registerIfNot(long timeout)
register a Deadline threadlocal object to current thread.
|
static void |
resetTimeout(long timeoutMs)
reset the timeout value of this timer.
|
static boolean |
startTimer(String method)
start the timer before a method is invoked.
|
static void |
stopTimer()
end the time after a method is done.
|
public static void registerIfNot(long timeout)
timeout
- public static void resetTimeout(long timeoutMs) throws MetaException
timeoutMs
- MetaException
public static boolean startTimer(String method) throws MetaException
method
- method to be invokedMetaException
public static void stopTimer() throws MetaException
MetaException
public static void clear()
public static void checkTimeout() throws MetaException
MetaException
- when the method timeoutCopyright © 2022 The Apache Software Foundation. All rights reserved.