org.apache.commons.lang3.concurrent.TimedSemaphore.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jelly Show documentation
Show all versions of jelly Show documentation
Java Functional Metaprogramming API
The newest version!
???? 2 ?
( q
) r??????? s
t u ( v ( w ( x ( y z
{
|
}
( ~ ( ( ?
( ? ? ? ( ? ? ?
( ? ? ?
?
( ?
( ? ( ?
) ? ( ?
( ? ( ? ( ? ?
" ?
( ?
( ? ? ?
) ? ? ? InnerClasses NO_LIMIT I
ConstantValue THREAD_POOL_SIZE executorService /Ljava/util/concurrent/ScheduledExecutorService; period J unit Ljava/util/concurrent/TimeUnit; ownExecutor Z task &Ljava/util/concurrent/ScheduledFuture; Signature )Ljava/util/concurrent/ScheduledFuture<*>; totalAcquireCount periodCount limit acquireCount lastCallsPerPeriod shutdown $(JLjava/util/concurrent/TimeUnit;I)V Code LineNumberTable LocalVariableTable this 4Lorg/apache/commons/lang3/concurrent/TimedSemaphore;
timePeriod timeUnit S(Ljava/util/concurrent/ScheduledExecutorService;JLjava/util/concurrent/TimeUnit;I)V s 2Ljava/util/concurrent/ScheduledThreadPoolExecutor; service
StackMapTable ? ? ? getLimit ()I setLimit (I)V ()V
isShutdown ()Z acquire canPass
Exceptions ? getLastAcquiresPerPeriod getAcquireCount getAvailablePermits getAverageCallsPerPeriod ()D getPeriod ()J getUnit !()Ljava/util/concurrent/TimeUnit; getExecutorService 1()Ljava/util/concurrent/ScheduledExecutorService;
startTimer (()Ljava/util/concurrent/ScheduledFuture; +()Ljava/util/concurrent/ScheduledFuture<*>; endOfPeriod
SourceFile TimedSemaphore.java D M D Y #Time period must be greater than 0! ? ? ? 4 5 6 7 2 3 8 9 0java/util/concurrent/ScheduledThreadPoolExecutor D X ? ? ? ? W X @ - C 9 i j ? ? ? : ; ? ? ? Z [ java/lang/IllegalStateException TimedSemaphore is shut down! D ? k l U V A - ? Y B - a V ? 5 > 5 4org/apache/commons/lang3/concurrent/TimedSemaphore$1 D ? e f g h ? ? ? Y 2org/apache/commons/lang3/concurrent/TimedSemaphore java/lang/Object -java/util/concurrent/ScheduledExecutorService java/util/concurrent/TimeUnit java/lang/InterruptedException !org/apache/commons/lang3/Validate inclusiveBetween (JJJLjava/lang/String;)V 3setContinueExistingPeriodicTasksAfterShutdownPolicy (Z)V 1setExecuteExistingDelayedTasksAfterShutdownPolicy shutdownNow ()Ljava/util/List; $java/util/concurrent/ScheduledFuture cancel (Z)Z (Ljava/lang/String;)V wait 7(Lorg/apache/commons/lang3/concurrent/TimedSemaphore;)V scheduleAtFixedRate ](Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture; notifyAll ! ( )
, - . / 0 - . 1 2 3 4 5 6 7 8 9 : ; <