com.zaxxer.hikari.pool.HikariPool.class Maven / Gradle / Ivy
???? 4? !com/zaxxer/hikari/pool/HikariPool com/zaxxer/hikari/pool/PoolBase "com/zaxxer/hikari/HikariPoolMXBean 6com/zaxxer/hikari/util/ConcurrentBag$IBagStateListener HikariPool.java =com/zaxxer/hikari/pool/HikariPool$PoolInitializationException
PoolInitializationException /com/zaxxer/hikari/pool/HikariPool$KeepaliveTask
KeepaliveTask 1com/zaxxer/hikari/pool/HikariPool$MaxLifetimeTask MaxLifetimeTask -com/zaxxer/hikari/pool/HikariPool$HouseKeeper HouseKeeper 2com/zaxxer/hikari/pool/HikariPool$PoolEntryCreator PoolEntryCreator #com/zaxxer/hikari/pool/HikariPool$1 8com/zaxxer/hikari/pool/PoolBase$ConnectionSetupException ConnectionSetupException 8com/zaxxer/hikari/util/ConcurrentBag$IConcurrentBagEntry $com/zaxxer/hikari/util/ConcurrentBag IConcurrentBagEntry ;java/util/concurrent/ThreadPoolExecutor$DiscardOldestPolicy # 'java/util/concurrent/ThreadPoolExecutor % DiscardOldestPolicy 8java/util/concurrent/ThreadPoolExecutor$CallerRunsPolicy ( CallerRunsPolicy 6com/zaxxer/hikari/pool/PoolBase$MetricsTrackerDelegate + MetricsTrackerDelegate 9com/zaxxer/hikari/pool/PoolBase$NopMetricsTrackerDelegate . NopMetricsTrackerDelegate 5java/util/concurrent/ThreadPoolExecutor$DiscardPolicy 1
DiscardPolicy 6com/zaxxer/hikari/util/UtilityElf$DefaultThreadFactory 4 !com/zaxxer/hikari/util/UtilityElf 6 DefaultThreadFactory IBagStateListener 7com/zaxxer/hikari/pool/PoolBase$IMetricsTrackerDelegate : IMetricsTrackerDelegate %java/lang/invoke/MethodHandles$Lookup = java/lang/invoke/MethodHandles ? Lookup logger Lorg/slf4j/Logger; POOL_NORMAL I POOL_SUSPENDED
POOL_SHUTDOWN poolState aliveBypassWindowMs J housekeepingPeriodMs EVICTED_CONNECTION_MESSAGE Ljava/lang/String; (connection was evicted) Q DEAD_CONNECTION_MESSAGE (connection is dead) T poolEntryCreator 4Lcom/zaxxer/hikari/pool/HikariPool$PoolEntryCreator; postFillPoolEntryCreator addConnectionQueueReadOnlyView Ljava/util/Collection; ,Ljava/util/Collection; addConnectionExecutor )Ljava/util/concurrent/ThreadPoolExecutor; closeConnectionExecutor
connectionBag &Lcom/zaxxer/hikari/util/ConcurrentBag; JLcom/zaxxer/hikari/util/ConcurrentBag; leakTaskFactory -Lcom/zaxxer/hikari/pool/ProxyLeakTaskFactory; suspendResumeLock *Lcom/zaxxer/hikari/util/SuspendResumeLock; houseKeepingExecutorService /Ljava/util/concurrent/ScheduledExecutorService; houseKeeperTask &Ljava/util/concurrent/ScheduledFuture; )Ljava/util/concurrent/ScheduledFuture<*>; #(Lcom/zaxxer/hikari/HikariConfig;)V k l
m org/slf4j/LoggerFactory o getLogger %(Ljava/lang/Class;)Lorg/slf4j/Logger; q r
p s B C u %com.zaxxer.hikari.aliveBypassWindowMs w java/util/concurrent/TimeUnit y MILLISECONDS Ljava/util/concurrent/TimeUnit; { | z } ? toMillis (J)J ? ?
z ? java/lang/Long ? getLong %(Ljava/lang/String;J)Ljava/lang/Long; ? ?
? ? longValue ()J ? ?
? ? L M ? 'com.zaxxer.hikari.housekeeping.periodMs ? SECONDS ? | z ? N M ? 8(Lcom/zaxxer/hikari/pool/HikariPool;Ljava/lang/String;)V k ?
? V W ?
After adding ? X W ? ;(Lcom/zaxxer/hikari/util/ConcurrentBag$IBagStateListener;)V k ?
! ? _ ` ? com/zaxxer/hikari/HikariConfig ? isAllowPoolSuspension ()Z ? ?
? ? (com/zaxxer/hikari/util/SuspendResumeLock ? ()V k ?
? ? FAUX_LOCK ? e ? ? d e ? %initializeHouseKeepingExecutorService 1()Ljava/util/concurrent/ScheduledExecutorService; ? ?
? f g ?
checkFailFast ? ?
? getMetricsTrackerFactory 3()Lcom/zaxxer/hikari/metrics/MetricsTrackerFactory; ? ?
? ? setMetricsTrackerFactory 4(Lcom/zaxxer/hikari/metrics/MetricsTrackerFactory;)V ? ?
? getMetricRegistry ()Ljava/lang/Object; ? ?
? ? setMetricRegistry (Ljava/lang/Object;)V ? ?
? getHealthCheckRegistry ? ?
? ? setHealthCheckRegistry ? ?
? handleMBeans '(Lcom/zaxxer/hikari/pool/HikariPool;Z)V ? ?
? getThreadFactory &()Ljava/util/concurrent/ThreadFactory; ? ?
? ? getMaximumPoolSize ()I ? ?
? ? (java/util/concurrent/LinkedBlockingQueue ? (I)V k ?
? ? java/util/Collections ? unmodifiableCollection .(Ljava/util/Collection;)Ljava/util/Collection; ? ?
? ? Y Z ? java/lang/StringBuilder ?
? ? poolName ? P ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? connection adder ? toString ()Ljava/lang/String; ? ?
? ?
$ ? createThreadPoolExecutor ?(Ljava/util/concurrent/BlockingQueue;Ljava/lang/String;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)Ljava/util/concurrent/ThreadPoolExecutor;
7 \ ] connection closer
) ? ?(ILjava/lang/String;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)Ljava/util/concurrent/ThreadPoolExecutor;
7 ^ ]
+com/zaxxer/hikari/pool/ProxyLeakTaskFactory getLeakDetectionThreshold ?
? 3(JLjava/util/concurrent/ScheduledExecutorService;)V k
b c K(Lcom/zaxxer/hikari/pool/HikariPool;Lcom/zaxxer/hikari/pool/HikariPool$1;)V k
d -java/util/concurrent/ScheduledExecutorService scheduleWithFixedDelay ](Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture; !" h i $ "com.zaxxer.hikari.blockUntilFilled& java/lang/Boolean(
getBoolean (Ljava/lang/String;)Z*+
), getInitializationFailTimeout. ?
?/ java/lang/Runtime1
getRuntime ()Ljava/lang/Runtime;34
25 availableProcessors7 ?
28 java/lang/Math: min (II)I<=
;> setMaximumPoolSize@ ?
&A setCorePoolSizeC ?
&D "com/zaxxer/hikari/util/ClockSourceF currentTimeH ?GI "java/util/concurrent/ThreadFactoryK
elapsedMillisM ?GN getTotalConnectionsP ?
Q getMinimumIdleS ?
?T quietlySleep (J)VVW
7X startTime this #Lcom/zaxxer/hikari/pool/HikariPool; config Lcom/zaxxer/hikari/HikariConfig;
threadFactory $Ljava/util/concurrent/ThreadFactory; maxPoolSize addConnectionQueue @Ljava/util/concurrent/LinkedBlockingQueue; *Ljava/util/concurrent/LinkedBlockingQueue;
getConnection ()Ljava/sql/Connection; java/sql/SQLExceptiong connectionTimeouti M j (J)Ljava/sql/Connection;el
m java/lang/InterruptedExceptiono acquireq ?
?r borrow \(JLjava/util/concurrent/TimeUnit;)Lcom/zaxxer/hikari/util/ConcurrentBag$IConcurrentBagEntry;tu
!v com/zaxxer/hikari/pool/PoolEntryx isMarkedEvictedz ?
y{ lastAccessed} M y~ (JJ)JM?G?
connection Ljava/sql/Connection;?? y? isConnectionAlive (Ljava/sql/Connection;)Z??
? java/lang/String? closeConnection 7(Lcom/zaxxer/hikari/pool/PoolEntry;Ljava/lang/String;)V??
? metricsTracker 9Lcom/zaxxer/hikari/pool/PoolBase$IMetricsTrackerDelegate;?? ? recordBorrowStats &(Lcom/zaxxer/hikari/pool/PoolEntry;J)V?? ;? schedule J(Lcom/zaxxer/hikari/pool/PoolEntry;)Lcom/zaxxer/hikari/pool/ProxyLeakTask;??
? createProxyConnection >(Lcom/zaxxer/hikari/pool/ProxyLeakTask;J)Ljava/sql/Connection;??
y? release? ?
?? recordBorrowTimeoutStats?W ;? createTimeoutException (J)Ljava/sql/SQLException;??
? java/lang/Thread?
currentThread ()Ljava/lang/Thread;??
?? interrupt? ?
?? , - Interrupted during connection acquisition? *(Ljava/lang/String;Ljava/lang/Throwable;)V k?
h? java/lang/Throwable? poolEntry "Lcom/zaxxer/hikari/pool/PoolEntry; now timeout e Ljava/lang/InterruptedException; hardTimeout shutdown K E ? After shutdown ? logPoolState ([Ljava/lang/String;)V??
? close? ? ;? Before shutdown ? $java/util/concurrent/ScheduledFuture? cancel (Z)Z???? softEvictConnections? ?
?? ?
&? getLoginTimeout? ?
? awaitTermination #(JLjava/util/concurrent/TimeUnit;)Z??
&? "destroyHouseKeepingExecutorService? ?
?
!?]^ ? connection assassinator? $java/util/concurrent/ExecutorService? abortActiveConnections )(Ljava/util/concurrent/ExecutorService;)V??
?
???? shutdownNetworkTimeoutExecutor? ?
? start assassinExecutor &Ljava/util/concurrent/ExecutorService; evictConnection (Ljava/sql/Connection;)V &com/zaxxer/hikari/pool/ProxyConnection? cancelLeakTask? ?
?? getPoolEntry $()Lcom/zaxxer/hikari/pool/PoolEntry;
? (connection evicted by user) java/sql/Connection isClosed ?
softEvictConnection 8(Lcom/zaxxer/hikari/pool/PoolEntry;Ljava/lang/String;Z)Z
proxyConnection (Lcom/zaxxer/hikari/pool/ProxyConnection; #com.codahale.metrics.MetricRegistry safeIsAssignableFrom '(Ljava/lang/Object;Ljava/lang/String;)Z
7 Bcom/zaxxer/hikari/metrics/dropwizard/CodahaleMetricsTrackerFactory #com/codahale/metrics/MetricRegistry ((Lcom/codahale/metrics/MetricRegistry;)V k
+io.micrometer.core.instrument.MeterRegistry Dcom/zaxxer/hikari/metrics/micrometer/MicrometerMetricsTrackerFactory! +io/micrometer/core/instrument/MeterRegistry# 0(Lio/micrometer/core/instrument/MeterRegistry;)V k%
"& metricRegistry Ljava/lang/Object; getPoolName* ?
?+ getPoolStats '()Lcom/zaxxer/hikari/metrics/PoolStats;-.
/ /com/zaxxer/hikari/metrics/MetricsTrackerFactory1 create d(Ljava/lang/String;Lcom/zaxxer/hikari/metrics/PoolStats;)Lcom/zaxxer/hikari/metrics/IMetricsTracker;3425 .(Lcom/zaxxer/hikari/metrics/IMetricsTracker;)V k7
,8
/ ? metricsTrackerFactory 1Lcom/zaxxer/hikari/metrics/MetricsTrackerFactory; /com/codahale/metrics/health/HealthCheckRegistry= :com/zaxxer/hikari/metrics/dropwizard/CodahaleHealthChecker? registerHealthChecks w(Lcom/zaxxer/hikari/pool/HikariPool;Lcom/zaxxer/hikari/HikariConfig;Lcom/codahale/metrics/health/HealthCheckRegistry;)VAB
@C healthCheckRegistry
addBagItem java/util/CollectionG sizeI ?HJ submit >(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;LM
&N 0{} - Add connection elided, waiting {}, queue {}P java/lang/ObjectR java/lang/IntegerT valueOf (I)Ljava/lang/Integer;VW
UX org/slf4j/LoggerZ debug ((Ljava/lang/String;[Ljava/lang/Object;)V\][^ waiting shouldAdd Z getActiveConnections getCount (I)Ide
!f getIdleConnections
!J getThreadsAwaitingConnection getWaitingThreadCountk ?
!l values ()Ljava/util/List;no
!p ? lambda$softEvictConnections$0 %(Lcom/zaxxer/hikari/pool/PoolEntry;)Vst
uvt "java/lang/invoke/LambdaMetafactoryy metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;{|
z}~ accept B(Lcom/zaxxer/hikari/pool/HikariPool;)Ljava/util/function/Consumer;?? ? java/util/List? forEach (Ljava/util/function/Consumer;)V???? suspendPool java/lang/IllegalStateException? - is not suspendable? (Ljava/lang/String;)V k?
?? suspend? ?
??
resumePool fillPool? ?
? resume? ?
?? isDebugEnabled? ?[? 7{} - {}stats (total={}, active={}, idle={}, waiting={})? [Ljava/lang/String;? [Ljava/lang/Object;? ?c ?
?h ?
?j ?
? prefix recycle recordConnectionUsage?t ;? requite =(Lcom/zaxxer/hikari/util/ConcurrentBag$IConcurrentBagEntry;)V??
!? remove =(Lcom/zaxxer/hikari/util/ConcurrentBag$IConcurrentBagEntry;)Z??
!??f
y? ? lambda$closeConnection$1 *(Ljava/sql/Connection;Ljava/lang/String;)V??
?? run `(Lcom/zaxxer/hikari/pool/HikariPool;Ljava/sql/Connection;Ljava/lang/String;)Ljava/lang/Runnable;?? ? execute (Ljava/lang/Runnable;)V??
&?
closureReason getPoolStateCounts ()[I getStateCounts??
!? createPoolEntry java/lang/Exception? newPoolEntry?
? getMaxLifetime? ?
?? ' &java/util/concurrent/ThreadLocalRandom? current *()Ljava/util/concurrent/ThreadLocalRandom;??
?? ( nextLong? ?
?? H(Lcom/zaxxer/hikari/pool/HikariPool;Lcom/zaxxer/hikari/pool/PoolEntry;)V k?
? \(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;??? setFutureEol )(Ljava/util/concurrent/ScheduledFuture;)V??
y? getKeepaliveTime? ?
??
? setKeepalive??
y? ={} - Error thrown while acquiring connection from data source? getCause ()Ljava/lang/Throwable;??
? error 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V??[? lastConnectionFailure -Ljava/util/concurrent/atomic/AtomicReference; +java/util/concurrent/atomic/AtomicReference set ?
/{} - Cannot acquire connection from data source
\?[ variance lifetime
heartbeatTime maxLifetime
keepaliveTime :Lcom/zaxxer/hikari/pool/PoolBase$ConnectionSetupException; Ljava/lang/Exception; 4{} - Fill pool skipped, pool is at sufficient level. '(Ljava/lang/String;Ljava/lang/Object;)V\[ java/util/concurrent/Callable i connectionsToAdd (I)Ljava/util/List;n
! iterator ()Ljava/util/Iterator;!"?# java/util/Iterator% hasNext' ?&( next* ?&+ abort "(Ljava/util/concurrent/Executor;)V-./ $(connection aborted during shutdown)1 quietlyCloseConnection3?
4 Ljava/lang/Throwable;?
7 add9?
!: {} - Added connection {}< 7(initialization check complete and minimumIdle is zero)> getLastConnectionFailure ()Ljava/lang/Exception;@A
B
?? throwPoolInitializationException (Ljava/lang/Throwable;)VEF
G initializationTimeout *{} - Exception during pool initialization.J kF
L t markEvictedO ?
yP reserveR?
!S reason owner getScheduledExecutorW ?
?X java/util/OptionalZ
ofNullable ((Ljava/lang/Object;)Ljava/util/Optional;\]
[^ ? .lambda$initializeHouseKeepingExecutorService$2a ?
bc ? get B(Lcom/zaxxer/hikari/pool/HikariPool;)Ljava/util/function/Supplier;fg h orElseGet 1(Ljava/util/function/Supplier;)Ljava/lang/Object;jk
[l 0java/util/concurrent/ScheduledThreadPoolExecutorn
2 ? W(ILjava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)V kq
or 1setExecuteExistingDelayedTasksAfterShutdownPolicy (Z)Vtu
ov setRemoveOnCancelPolicyxu
oy executor 2Ljava/util/concurrent/ScheduledThreadPoolExecutor; shutdownNow}o~ '(Lcom/zaxxer/hikari/pool/HikariPool;J)V k?
? Timeout failure ? recordConnectionTimeout? ? ;? getSQLState? ?
h? (java/sql/SQLTransientConnectionException? 8 - Connection is not available, request timed out after ? (J)Ljava/lang/StringBuilder; ??
?? ms.? <(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V k?
?? setNextException (Ljava/sql/SQLException;)V??
h? sqlState originalException connectionException Ljava/sql/SQLException; getUnwrappedDataSource ()Ljavax/sql/DataSource;??
?
? housekeeper? (Ljava/lang/String;Z)V k?
5? (connection evicted)?
access$100 G(Lcom/zaxxer/hikari/pool/HikariPool;)Lcom/zaxxer/hikari/pool/PoolEntry; x0
access$200 K(Lcom/zaxxer/hikari/pool/HikariPool;)Lcom/zaxxer/hikari/util/ConcurrentBag;
access$300 7(Lcom/zaxxer/hikari/pool/HikariPool;)Lorg/slf4j/Logger;
access$400 &(Lcom/zaxxer/hikari/pool/HikariPool;)J
access$500 R(Lcom/zaxxer/hikari/pool/HikariPool;)Lcom/zaxxer/hikari/pool/ProxyLeakTaskFactory;
access$600 &(Lcom/zaxxer/hikari/pool/HikariPool;)V
access$700 [(Lcom/zaxxer/hikari/pool/HikariPool;Lcom/zaxxer/hikari/pool/PoolEntry;Ljava/lang/String;Z)Z x1 x2 x3
ConstantValue Signature Code
StackMapTable LineNumberTable LocalVariableTable LocalVariableTypeTable
Exceptions InnerClasses
SourceFile BootstrapMethods 1 B C D E ? F G E ? H I E ? J A K E L M N M O P ? R S P ? U V W X W Y Z ? [ \ ] ^ ] _ ` ? a b c d e f g h i ? j * k l ? ? ?*+? n*? t? v*x? ~ ? ?? ?? ?? ?*?? ? ?? ?? ?? ?? ?*? Y*? ?? ?*? Y*?? ?? ?*? !Y*? ?? ?*+? ??
? ?Y? ?? ? ?? ?**? ?? ?*? ?+? ?? *+? Ķ ȧ *+? ̶ ?*+? Ӷ ?**? ?+? ?M+? ?>? ?Y? ?:*? ?? ?*? ?Y? ?*? ?? ??? ?? ?,? $Y? ??*? ?Y? ?*? ?? ?? ?? ?,? )Y? ??*?Y+?*? ???**? ?? Y*?*? ?? ~?# ?%'?-? l+?0
?? c*??6?9???B*??6?9???E?J7?O+?0?? *?R+?U? ? ~? ??Y???*??E*??B? ? @ ? q ? ? ? ? ? ? ?L ? &? ? ? l I Q # R 8 W E X S n _ o w q s ? u ? v ? y ? | ? ~ ? ? ? ? ? ? ? ? ? ? ? ? ?) ?I ?[ ?m ? ?? ?? ?? ?? ?? ?? > ? 7Z M ?[\ ?]^ ?_` ?a E ? ?bd ? ? ?bc ef ? 3 **?k?n? ? ?? [\ ? h el ? ?*? ??s?JB7*? ?? ~?w?y:? ? }?J7?|? !???*? ??? /*????? #*?|? R? U??!?Oe7? +*??!?? *?????:
*? ???
? ???p*??!?? *!???:?????hY? ?Y? ?*? ?? ??? ?? ????:*? ???? ? ?p ? ? ?p ? ? ? ? ? ? Z
? ? y? *? y y? y y?
? '? ph?? Z ? ? ? ? ? $ ? ' ? , ? R ? g ? r ? ~ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? H {?? , n? M ?? M ? '?? ?[\ ?? M ?Z M ? h !? ? ? | S*??*?? !*??Y?S??**? ?*???? ?*??Y?S??*?%? *?%?? W*?%*??*???*?*?ݲ ???W*??*? ???*?? ? ?Y? ?*? ?? ?? ?? ?*?? )Y? ?L?JA*+??*??*?R? ?O? ?? ?????+?? +? ??? W? :+?? +? ??? W?*??*???*?? ???W*??Y?S??**? ?*???? ? %:*??Y?S??**? ?*???? ?? ? ? ? ? ? ? 0 *0 020 ? ! *$? X?? U?? 8 ?!? ? ( ? ? ) ? * ? 8 ? ? ? J ? O ? S ? Z ? i ? m ? t ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?$-0@FOR? ? !? M ? l?? S[\ ? p ?? ? ? (+??M,? *,?+? ? ? ?W? N? # &h ? : ? ? y?? ? y?Fh ? # & '? ([\ (?? # ? ? ? ? F+? +?? *?Y+??? ȧ (+? + ?? *?"Y+?$?'? ȧ *? ȱ ? ? " # % .&