This commit is contained in:
@@ -27,7 +27,7 @@ import org.redkale.util.*;
|
|||||||
* @author zhangjx
|
* @author zhangjx
|
||||||
* @param <T> 结果对象的泛型
|
* @param <T> 结果对象的泛型
|
||||||
*/
|
*/
|
||||||
public class RetResult<T> implements Serializable{
|
public class RetResult<T> implements Serializable {
|
||||||
|
|
||||||
public static final Type TYPE_RET_INTEGER = new TypeToken<RetResult<Integer>>() {
|
public static final Type TYPE_RET_INTEGER = new TypeToken<RetResult<Integer>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
@@ -121,6 +121,8 @@ public class RetResult<T> implements Serializable{
|
|||||||
public static <T> RetResult<T> get(CompletableFuture<RetResult<T>> future, long timeout, TimeUnit unit) {
|
public static <T> RetResult<T> get(CompletableFuture<RetResult<T>> future, long timeout, TimeUnit unit) {
|
||||||
try {
|
try {
|
||||||
return future.get(timeout, unit);
|
return future.get(timeout, unit);
|
||||||
|
} catch (ExecutionException ex) {
|
||||||
|
throw new RuntimeException(ex.getCause());
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new RuntimeException(ex);
|
throw new RuntimeException(ex);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user