Commit 6675b737 authored by Andre Freyssinet's avatar Andre Freyssinet

Adds header and enhances Javadoc.

parent 6778d4dc
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2019 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): ScalAgent Distributed Technologies
* Contributor(s):
*/
package fr.dyade.aaa.common.concurrent;
import java.util.concurrent.Callable;
......@@ -18,6 +40,7 @@ public class TimeLimiter {
* propagated. If the time limit is reached, we attempt to abort the call, and throw a {@link TimeoutException}
* to the caller.
*
* @param <T> the type of the task's result
* @param callable the Callable to execute
* @param timeoutDuration with timeoutUnit, the maximum length of time to wait
* @param timeoutUnit with timeoutDuration, the maximum length of time to wait
......@@ -54,10 +77,9 @@ public class TimeLimiter {
* propagated. If the time limit is reached, we attempt to abort the call, and throw a {@link TimeoutException}
* to the caller.
*
* @param callable the Callable to execute
* @param runnable the Runnable to execute
* @param timeoutDuration with timeoutUnit, the maximum length of time to wait
* @param timeoutUnit with timeoutDuration, the maximum length of time to wait
* @return the result returned by the Callable
* @throws Exception if the time limit is reached, the thread is interrupted, or an exception
* is thrown during execution.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment