![JAR search and dependency download from the Maven repository](/logo.png)
com.google.common.util.concurrent.SimpleTimeLimiter.class Maven / Gradle / Ivy
???? 4
3com/google/common/util/concurrent/SimpleTimeLimiter
throwCause -(Ljava/lang/Exception;Z)Ljava/lang/Exception;
callWithTimeout T(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;Z)Ljava/lang/Object;
java/lang/Object ()V
$com/google/common/base/Preconditions checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object; $java/util/concurrent/ExecutorService executor &Ljava/util/concurrent/ExecutorService;
)(Ljava/util/concurrent/ExecutorService;)V
! " # checkPositiveTimeout (J)V
% & ' ( ) java/lang/Class isInterface ()Z + 'interfaceType must be an interface type
- . /
checkArgument (ZLjava/lang/Object;)V
1 2 3 findInterruptibleMethods "(Ljava/lang/Class;)Ljava/util/Set; 5 5com/google/common/util/concurrent/SimpleTimeLimiter$1
4 7 8 y(Lcom/google/common/util/concurrent/SimpleTimeLimiter;Ljava/lang/Object;JLjava/util/concurrent/TimeUnit;Ljava/util/Set;)V
: ; < newProxy J(Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object;
% > ? @ getClassLoader ()Ljava/lang/ClassLoader;
B C D E F java/lang/reflect/Proxy newProxyInstance b(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object;
% H I cast K L M submit >(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future; O P Q R S java/util/concurrent/Future get 4(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
U V W X Y 2com/google/common/util/concurrent/Uninterruptibles getUninterruptibly Q(Ljava/util/concurrent/Future;JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object; [ java/lang/InterruptedException O ] ^ _ cancel (Z)Z a 'java/util/concurrent/ExecutionException c %java/util/concurrent/TimeoutException e ;com/google/common/util/concurrent/UncheckedTimeoutException
d g h (Ljava/lang/Throwable;)V
` j k l getCause ()Ljava/lang/Throwable;
n o h %wrapAndThrowExecutionExceptionOrError q java/lang/AssertionError
p
t L u 3(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
w x h ,wrapAndThrowRuntimeExecutionExceptionOrError
z j { java/lang/Exception
} ~ ? ? java/lang/Throwable
getStackTrace ()[Ljava/lang/StackTraceElement;
z ~ ? java/lang/StackTraceElement
? ? ? ? ? &com/google/common/collect/ObjectArrays concat L([Ljava/lang/Object;[Ljava/lang/Object;Ljava/lang/Class;)[Ljava/lang/Object; ? [Ljava/lang/StackTraceElement;
} ? ? ?
setStackTrace !([Ljava/lang/StackTraceElement;)V ? java/lang/Error
? ? ? ? ? com/google/common/collect/Sets
newHashSet ()Ljava/util/HashSet;
% ? ? ?
getMethods ()[Ljava/lang/reflect/Method;
? ? ? declaresInterruptedEx (Ljava/lang/reflect/Method;)Z ? ? ? ? ?
java/util/Set add (Ljava/lang/Object;)Z
? ? ? ? ? java/lang/reflect/Method getExceptionTypes ()[Ljava/lang/Class; ? 0com/google/common/util/concurrent/ExecutionError
? ? ? (Ljava/lang/Error;)V ? java/lang/RuntimeException ? =com/google/common/util/concurrent/UncheckedExecutionException
? g
` g ? timeout must be positive: %s
? . ? (ZLjava/lang/String;J)V ? -com/google/common/util/concurrent/TimeLimiter Code LineNumberTable LocalVariableTable this 5Lcom/google/common/util/concurrent/SimpleTimeLimiter; MethodParameters create ](Ljava/util/concurrent/ExecutorService;)Lcom/google/common/util/concurrent/SimpleTimeLimiter; W(Ljava/lang/Object;Ljava/lang/Class;JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object; target Ljava/lang/Object;
interfaceType Ljava/lang/Class; timeoutDuration J timeoutUnit Ljava/util/concurrent/TimeUnit; interruptibleMethods Ljava/util/Set; handler %Ljava/lang/reflect/InvocationHandler; LocalVariableTypeTable TT; Ljava/lang/Class; +Ljava/util/Set; Signature T(TT;Ljava/lang/Class;JLjava/util/concurrent/TimeUnit;)TT; object V(Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)TT; e Ljava/lang/InterruptedException; )Ljava/util/concurrent/ExecutionException; 'Ljava/util/concurrent/TimeoutException; callable Ljava/util/concurrent/Callable; amInterruptible Z future Ljava/util/concurrent/Future; $Ljava/util/concurrent/Callable; "Ljava/util/concurrent/Future;
StackMapTable
Exceptions `(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;Z)TT; RuntimeVisibleAnnotations 6Lcom/google/common/util/concurrent/ParametricNullness; RuntimeVisibleTypeAnnotations 5Lorg/checkerframework/checker/nullness/qual/Nullable; S(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object; Ljava/lang/Exception; ? java/util/concurrent/Callable ? java/util/concurrent/TimeUnit _(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)TT; RuntimeInvisibleAnnotations 8Lcom/google/errorprone/annotations/CanIgnoreReturnValue; callUninterruptiblyWithTimeout runWithTimeout 7(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)V runnable Ljava/lang/Runnable; Ljava/util/concurrent/Future<*>; ? java/lang/Runnable runUninterruptiblyWithTimeout combined combineStackTraces cause Ljava/lang/Throwable; m Ljava/lang/reflect/Method; set Ljava/lang/Class<*>;
[Ljava/lang/reflect/Method; A(Ljava/lang/Class<*>;)Ljava/util/Set; exType method [Ljava/lang/Class;
access$000 ?(Lcom/google/common/util/concurrent/SimpleTimeLimiter;Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;Z)Ljava/lang/Object; x0 x1 x2 x3 x4
access$100
SourceFile SimpleTimeLimiter.java CLcom/google/common/util/concurrent/ElementTypesAreNonnullByDefault; 0Lcom/google/common/annotations/J2ktIncompatible; /Lcom/google/common/annotations/GwtIncompatible; InnerClasses 1 ? ? L *? *+? ? ? ? ? : ; <