com.groupbyinc.flux.common.util.concurrent.PrioritizedEsThreadPoolExecutor.class Maven / Gradle / Ivy
???? 4 Jcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor ?com/groupbyinc/flux/common/util/concurrent/EsThreadPoolExecutor $PrioritizedEsThreadPoolExecutor.java `com/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor$PrioritizedFutureTask PrioritizedFutureTask icom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable TieBreakingPrioritizedRunnable Rcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor$Pending Pending NO_WAIT_TIME_VALUE +Lcom/groupbyinc/flux/common/unit/TimeValue; insertionOrder (Ljava/util/concurrent/atomic/AtomicLong; current Ljava/util/Queue; 'Ljava/util/Queue; timer /Ljava/util/concurrent/ScheduledExecutorService; ?(Ljava/lang/String;IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/ThreadFactory;Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;Ljava/util/concurrent/ScheduledExecutorService;)V *java/util/concurrent/PriorityBlockingQueue ()V
?(Ljava/lang/String;IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;)V
&java/util/concurrent/atomic/AtomicLong "
# % @com/groupbyinc/flux/common/util/concurrent/ConcurrentCollections ' newQueue ()Ljava/util/Queue; ) *
( + - / this LLcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor; name Ljava/lang/String; corePoolSize I maximumPoolSize
keepAliveTime J unit Ljava/util/concurrent/TimeUnit;
threadFactory $Ljava/util/concurrent/ThreadFactory;
contextHolder :Lcom/groupbyinc/flux/common/util/concurrent/ThreadContext;
getPending W()[Lcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor$Pending; java/util/ArrayList B
C (Ljava/util/Collection;)V E
C F
addPending $(Ljava/util/List;Ljava/util/List;Z)V H I
J getQueue &()Ljava/util/concurrent/BlockingQueue; L M
N java/util/List P size ()I R S Q T toArray (([Ljava/lang/Object;)[Ljava/lang/Object; V W Q X U[Lcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor$Pending; Z pending fLjava/util/List; Ljava/util/List; getNumberOfPendingTasks java/util/Queue ` a T "java/util/concurrent/BlockingQueue c d T getMaxTaskWaitTime -()Lcom/groupbyinc/flux/common/unit/TimeValue; h java/lang/System j nanoTime ()J l m
k n iterator ()Ljava/util/Iterator; p q d r java/util/Iterator t hasNext ()Z v w u x next ()Ljava/lang/Object; z { u | java/lang/Runnable ~ >com/groupbyinc/flux/common/util/concurrent/PrioritizedRunnable ? getCreationDateInNanos ? m
? ? java/lang/Math ? min (JJ)J ? ?
? ? )com/groupbyinc/flux/common/unit/TimeValue ? timeValueNanos .(J)Lcom/groupbyinc/flux/common/unit/TimeValue; ? ?
? ? queuedRunnable Ljava/lang/Runnable; now oldestCreationDateInNanos Q r
access$000 ?(Lcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable;)Ljava/lang/Runnable; ? ?
? unwrap *(Ljava/lang/Runnable;)Ljava/lang/Runnable; ? ?
? priority '()Lcom/groupbyinc/flux/common/Priority; ? ?
?
access$100 n(Lcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable;)J ? ?
? <(Ljava/lang/Object;Lcom/groupbyinc/flux/common/Priority;JZ)V ?
? add (Ljava/lang/Object;)Z ? ? Q ? task Ljava/lang/Object; ? ? ? java/lang/Object ? %Lcom/groupbyinc/flux/common/Priority; ? ? ? 9 ? t kLcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable;
innerRunnable bLcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor$PrioritizedFutureTask; runnable runnables &Ljava/util/List; executing Z
beforeExecute )(Ljava/lang/Thread;Ljava/lang/Runnable;)V a ? Ljava/lang/Thread; r afterExecute ,(Ljava/lang/Runnable;Ljava/lang/Throwable;)V ? ?
? remove ? ? a ? Ljava/lang/Throwable; execute V(Ljava/lang/Runnable;Lcom/groupbyinc/flux/common/unit/TimeValue;Ljava/lang/Runnable;)V wrapRunnable ? ?
? doExecute (Ljava/lang/Runnable;)V ? ?
? nanos ? m
? ? scheduleTimeout q(Ljava/util/concurrent/ScheduledExecutorService;Ljava/lang/Runnable;Lcom/groupbyinc/flux/common/unit/TimeValue;)V ? ?
? 'java/lang/UnsupportedOperationException ? 6Execute with timeout is not supported for future tasks ? (Ljava/lang/String;)V ?
? ? command timeout timeoutCallback
? ?
? incrementAndGet ? m
# ? ?(Lcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor;Ljava/lang/Runnable;Lcom/groupbyinc/flux/common/Priority;J)V ?
? #com/groupbyinc/flux/common/Priority ? NORMAL ? ? ? ?
newTaskFor M(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/RunnableFuture; wrap {(Ljava/lang/Runnable;Lcom/groupbyinc/flux/common/Priority;)Lcom/groupbyinc/flux/common/util/concurrent/PrioritizedRunnable; ? ?
? ? ?(Lcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor;Ljava/lang/Runnable;Lcom/groupbyinc/flux/common/Priority;Ljava/lang/Object;J)V ?
? value TT; F(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/RunnableFuture; >com/groupbyinc/flux/common/util/concurrent/PrioritizedCallable ?(Ljava/util/concurrent/Callable;Lcom/groupbyinc/flux/common/Priority;)Lcom/groupbyinc/flux/common/util/concurrent/PrioritizedCallable; ?
?(Lcom/groupbyinc/flux/common/util/concurrent/PrioritizedEsThreadPoolExecutor;Lcom/groupbyinc/flux/common/util/concurrent/PrioritizedCallable;J)V
callable $Ljava/util/concurrent/Callable; Ljava/util/concurrent/Callable; timeValueMillis
?
? Signature Code LocalVariableTable LineNumberTable LocalVariableTypeTable
StackMapTable ?(Ljava/util/List;Ljava/util/List;Z)V Y(Ljava/lang/Runnable;TT;)Ljava/util/concurrent/RunnableFuture; f(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/RunnableFuture;
SourceFile InnerClasses ! ?
/*+? Y? ? !*? #Y? $? &*? ,? .* ? 0? \ / 1 2 / 3 4 / 5 6 / 7 6 / 8 9 / : ; / <