Class TimeoutUtils
java.lang.Object
com.denodo.scheduler.client.remote.timed.TimeoutUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TcallWithTimeout(Callable<T> task, long timeout, TimeUnit timeUnit, String methodName) static ObjectdoInvokeMethod(Method method, Object target, Object[] args) static ObjectexecuteMethodWithTimeout(Method method, Object target, Object[] args, long timeout, TimeUnit timeUnit) static voidrunWithTimeout(Runnable task, long timeout, TimeUnit timeUnit, String methodName) static voidshutdown()
-
Method Details
-
executeMethodWithTimeout
public static Object executeMethodWithTimeout(Method method, Object target, Object[] args, long timeout, TimeUnit timeUnit) throws Exception - Throws:
Exception
-
doInvokeMethod
-
callWithTimeout
public static <T> T callWithTimeout(Callable<T> task, long timeout, TimeUnit timeUnit, String methodName) throws Exception - Throws:
Exception
-
runWithTimeout
public static void runWithTimeout(Runnable task, long timeout, TimeUnit timeUnit, String methodName) throws Exception - Throws:
Exception
-
shutdown
public static void shutdown()
-