com.zaxxer.hikari.pool.HikariPool.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of HikariCP Show documentation
Show all versions of HikariCP Show documentation
Ultimate JDBC Connection Pool
???? 7??
??
?? ?? ?? ?
??
??
?? ?? ?? ??
?? ??
? ??
? ??
? ?
M??
? ? ?
? ?
?
M?
?
M?
?
M?
?
?
M?
M??
0? ? ??
4?
?? ? ?
9?
?
M
=
A? d
M
^
^
M
?
W! W"# W$
%&'
( )*+e,-.
c/?0
=1
W2
3*4
56
78
79 ?
c; <=>
?*@ABC
D
^E
F
^GH?I
J
@ K ?
M
N
OPQ
?R
?STeU
VW
?XYZ
?[\]^
?_`
Mb
cde
?fg
??i
jk
^lmn
^o
p
n
q
r wxyz ?
?|
}
~
?????
??
?
?
???*?e??
?
?
W? ?
^?
?
?
M? '
?? (
???
??
?
W?
M??
??
W???
???? ?
?????????
?x?????e???
?
?
?????
?
??
??
??
W?
?
M?
?? ?
?????
??
??
??
??
??
???*?
c?
c?? ?
?
?
?
?? ?
|???? PoolInitializationException InnerClasses
KeepaliveTask MaxLifetimeTask HouseKeeper PoolEntryCreator logger Lorg/slf4j/Logger; POOL_NORMAL I
ConstantValue POOL_SUSPENDED
POOL_SHUTDOWN poolState aliveBypassWindowMs J housekeepingPeriodMs isRequestBoundariesEnabled Z EVICTED_CONNECTION_MESSAGE Ljava/lang/String; DEAD_CONNECTION_MESSAGE poolEntryCreator 4Lcom/zaxxer/hikari/pool/HikariPool$PoolEntryCreator; postFillPoolEntryCreator addConnectionExecutor )Ljava/util/concurrent/ThreadPoolExecutor; closeConnectionExecutor
connectionBag &Lcom/zaxxer/hikari/util/ConcurrentBag; Signature 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 Code LineNumberTable LocalVariableTable startTime this #Lcom/zaxxer/hikari/pool/HikariPool; config Lcom/zaxxer/hikari/HikariConfig;
threadFactory $Ljava/util/concurrent/ThreadFactory; maxPoolSize addConnectionQueue *Ljava/util/concurrent/LinkedBlockingQueue; LocalVariableTypeTable @Ljava/util/concurrent/LinkedBlockingQueue;
StackMapTable?
getConnection ()Ljava/sql/Connection;
Exceptions (J)Ljava/sql/Connection; e Ljava/sql/SQLException; poolEntry "Lcom/zaxxer/hikari/pool/PoolEntry; now timeout Ljava/lang/InterruptedException; hardTimeout shutdown ()V start assassinExecutor? evictConnection (Ljava/sql/Connection;)V
connection Ljava/sql/Connection; proxyConnection (Lcom/zaxxer/hikari/pool/ProxyConnection;? setMetricRegistry (Ljava/lang/Object;)V metricRegistry Ljava/lang/Object; setMetricsTrackerFactory 4(Lcom/zaxxer/hikari/metrics/MetricsTrackerFactory;)V metricsTrackerFactory 1Lcom/zaxxer/hikari/metrics/MetricsTrackerFactory; setHealthCheckRegistry healthCheckRegistry
addBagItem (I)V waiting getActiveConnections ()I getIdleConnections getTotalConnections getThreadsAwaitingConnection softEvictConnections suspendPool
resumePool logPoolState ([Ljava/lang/String;)V prefix [Ljava/lang/String;~?? recycle %(Lcom/zaxxer/hikari/pool/PoolEntry;)V closeConnection 7(Lcom/zaxxer/hikari/pool/PoolEntry;Ljava/lang/String;)V
closureReason getPoolStateCounts ()[I createPoolEntry $()Lcom/zaxxer/hikari/pool/PoolEntry; variance lifetime
heartbeatTime maxLifetime
keepaliveTime ConnectionSetupException :Lcom/zaxxer/hikari/pool/PoolBase$ConnectionSetupException; Ljava/lang/Exception; fillPool (Z)V i
countToAdd
isAfterAdd idle shouldAdd? abortActiveConnections )(Ljava/util/concurrent/ExecutorService;)V Ljava/lang/Throwable; &Ljava/util/concurrent/ExecutorService;??
checkFailFast initializationTimeout throwPoolInitializationException (Ljava/lang/Throwable;)V t softEvictConnection 8(Lcom/zaxxer/hikari/pool/PoolEntry;Ljava/lang/String;Z)Z reason owner %initializeHouseKeepingExecutorService 1()Ljava/util/concurrent/ScheduledExecutorService; executor 2Ljava/util/concurrent/ScheduledThreadPoolExecutor; "destroyHouseKeepingExecutorService getPoolStats '()Lcom/zaxxer/hikari/metrics/PoolStats; createTimeoutException (J)Ljava/sql/SQLException; sqlState errorCode originalException connectionException *Ljava/sql/SQLTransientConnectionException; getUnwrappedDataSource ()Ljavax/sql/DataSource; toString ()Ljava/lang/String; .lambda$initializeHouseKeepingExecutorService$2 &()Ljava/util/concurrent/ThreadFactory; lambda$closeConnection$1 *(Ljava/sql/Connection;Ljava/lang/String;)V lambda$softEvictConnections$0
SourceFile HikariPool.java NestMembers 8com/zaxxer/hikari/util/ConcurrentBag$IConcurrentBagEntry IConcurrentBagEntry;< !com/zaxxer/hikari/pool/HikariPool??? %com.zaxxer.hikari.aliveBypassWindowMs?????????? ! 'com.zaxxer.hikari.housekeeping.periodMs??"! )com.zaxxer.hikari.enableRequestBoundaries???#$ 2com/zaxxer/hikari/pool/HikariPool$PoolEntryCreator;?()
After adding ;?*) $com/zaxxer/hikari/util/ConcurrentBag; ./ (com/zaxxer/hikari/util/SuspendResumeLock;[545??67?[jkfgng
?t (java/util/concurrent/LinkedBlockingQueue;q
& BootstrapMethods 5com/zaxxer/hikari/util/UtilityElf$CustomDiscardPolicy CustomDiscardPolicy+, 8java/util/concurrent/ThreadPoolExecutor$CallerRunsPolicy CallerRunsPolicy-, +com/zaxxer/hikari/pool/ProxyLeakTaskFactory?;23 -com/zaxxer/hikari/pool/HikariPool$HouseKeeper89 "com.zaxxer.hikari.blockUntilFilled? t!"#$q%q&'?(?vt)t*+,!NQ-[./ com/zaxxer/hikari/pool/PoolEntry01!(2ab34 (connection was evicted) (connection is dead)??5789:;[ java/sql/SQLException !beginRequest Failed for: {}, ({})<?=>?@ABC[D+?? java/lang/InterruptedExceptionEFGH[I;J java/lang/String After shutdown {|K[ Before shutdown LMNx[Z[O?PQ 9Timed-out waiting for add connection executor to shutdown=R?[CDS?? 5Timed-out waiting for connection assassin to shutdownT[ ;Timed-out waiting for close connection executor to shutdown &com/zaxxer/hikari/pool/ProxyConnectionU[V? (connection evicted by user)W?? #com.codahale.metrics.MetricRegistryXY Bcom/zaxxer/hikari/metrics/dropwizard/CodahaleMetricsTrackerFactory #com/codahale/metrics/MetricRegistry;Z +io.micrometer.core.instrument.MeterRegistry Dcom/zaxxer/hikari/metrics/micrometer/MicrometerMetricsTrackerFactory +io/micrometer/core/instrument/MeterRegistry;[ 6com/zaxxer/hikari/pool/PoolBase$MetricsTrackerDelegate MetricsTrackerDelegate\???]^_;` 9com/zaxxer/hikari/pool/PoolBase$NopMetricsTrackerDelegate NopMetricsTrackerDelegate /com/codahale/metrics/health/HealthCheckRegistryabcdefgthijkltmnogp?qrstu java/lang/IllegalStateExceptionv;Rw[??x[y ={} - {}stats (total={}/{}, idle={}/{}, active={}, waiting={}) java/lang/Object z{|utstwt}~??[ endRequest Failed for: {},({})????KO[???????????????? 1com/zaxxer/hikari/pool/HikariPool$MaxLifetimeTask;??????? /com/zaxxer/hikari/pool/HikariPool$KeepaliveTask?? 8com/zaxxer/hikari/pool/PoolBase$ConnectionSetupException ={} - Error thrown while acquiring connection from data source???>????g java/lang/Exception /{} - Cannot acquire connection from data source}> L{} - Fill pool skipped, pool has sufficient level or currently being filled.}?m??????? java/lang/Throwable $(connection aborted during shutdown)?????? {} - Added connection {}?> 7(initialization check complete and minimumIdle is zero)???? =com/zaxxer/hikari/pool/HikariPool$PoolInitializationException;??[????????????? "java/util/concurrent/ThreadFactory 0java/util/concurrent/ScheduledThreadPoolExecutor 5java/util/concurrent/ThreadPoolExecutor$DiscardPolicy
DiscardPolicy;??????n #com/zaxxer/hikari/pool/HikariPool$1;? Timeout failure ?[???t (java/sql/SQLTransientConnectionException??;??????? 6com/zaxxer/hikari/util/UtilityElf$DefaultThreadFactory DefaultThreadFactory? (connection evicted) com/zaxxer/hikari/pool/PoolBase "com/zaxxer/hikari/HikariPoolMXBean 6com/zaxxer/hikari/util/ConcurrentBag$IBagStateListener IBagStateListener com/zaxxer/hikari/HikariConfig 'java/util/concurrent/ThreadPoolExecutor java/sql/Connection org/slf4j/Logger [Ljava/lang/Object; java/util/concurrent/Callable java/util/Iterator $java/util/concurrent/ExecutorService org/slf4j/LoggerFactory getLogger %(Ljava/lang/Class;)Lorg/slf4j/Logger; java/util/concurrent/TimeUnit MILLISECONDS Ljava/util/concurrent/TimeUnit; toMillis (J)J java/lang/Long getLong %(Ljava/lang/String;J)Ljava/lang/Long; longValue ()J SECONDS java/lang/Boolean
getBoolean (Ljava/lang/String;)Z &(Lcom/zaxxer/hikari/pool/HikariPool;)V 8(Lcom/zaxxer/hikari/pool/HikariPool;Ljava/lang/String;)V ;(Lcom/zaxxer/hikari/util/ConcurrentBag$IBagStateListener;)V isAllowPoolSuspension ()Z FAUX_LOCK getMetricsTrackerFactory 3()Lcom/zaxxer/hikari/metrics/MetricsTrackerFactory; getMetricRegistry ()Ljava/lang/Object; getHealthCheckRegistry handleMBeans '(Lcom/zaxxer/hikari/pool/HikariPool;Z)V getThreadFactory getMaximumPoolSize poolName
?? connection adder makeConcatWithConstants &(Ljava/lang/String;)Ljava/lang/String; !com/zaxxer/hikari/util/UtilityElf createThreadPoolExecutor ?(Ljava/util/concurrent/BlockingQueue;Ljava/lang/String;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)Ljava/util/concurrent/ThreadPoolExecutor; connection closer ?(ILjava/lang/String;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)Ljava/util/concurrent/ThreadPoolExecutor; getLeakDetectionThreshold 3(JLjava/util/concurrent/ScheduledExecutorService;)V -java/util/concurrent/ScheduledExecutorService scheduleWithFixedDelay ](Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture; getInitializationFailTimeout java/lang/Runtime
getRuntime ()Ljava/lang/Runtime; availableProcessors java/lang/Math min (II)I setMaximumPoolSize setCorePoolSize "com/zaxxer/hikari/util/ClockSource currentTime
elapsedMillis getMinimumIdle quietlySleep (J)V connectionTimeout acquire borrow \(JLjava/util/concurrent/TimeUnit;)Lcom/zaxxer/hikari/util/ConcurrentBag$IConcurrentBagEntry; isMarkedEvicted lastAccessed (JJ)J isConnectionDead (Ljava/sql/Connection;)Z metricsTracker IMetricsTrackerDelegate 9Lcom/zaxxer/hikari/pool/PoolBase$IMetricsTrackerDelegate; 7com/zaxxer/hikari/pool/PoolBase$IMetricsTrackerDelegate recordBorrowStats &(Lcom/zaxxer/hikari/pool/PoolEntry;J)V beginRequest
getMessage warn 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V schedule J(Lcom/zaxxer/hikari/pool/PoolEntry;)Lcom/zaxxer/hikari/pool/ProxyLeakTask; createProxyConnection =(Lcom/zaxxer/hikari/pool/ProxyLeakTask;)Ljava/sql/Connection; release recordBorrowTimeoutStats java/lang/Thread
currentThread ()Ljava/lang/Thread; interrupt - - Interrupted during connection acquisition *(Ljava/lang/String;Ljava/lang/Throwable;)V close $java/util/concurrent/ScheduledFuture cancel (Z)Z getLoginTimeout awaitTermination #(JLjava/util/concurrent/TimeUnit;)Z (Ljava/lang/String;)V connection assassinator shutdownNetworkTimeoutExecutor cancelLeakTask getPoolEntry isClosed safeIsAssignableFrom '(Ljava/lang/Object;Ljava/lang/String;)Z ((Lcom/codahale/metrics/MetricRegistry;)V 0(Lio/micrometer/core/instrument/MeterRegistry;)V getPoolName /com/zaxxer/hikari/metrics/MetricsTrackerFactory create d(Ljava/lang/String;Lcom/zaxxer/hikari/metrics/PoolStats;)Lcom/zaxxer/hikari/metrics/IMetricsTracker; .(Lcom/zaxxer/hikari/metrics/IMetricsTracker;)V :com/zaxxer/hikari/metrics/dropwizard/CodahaleHealthChecker registerHealthChecks w(Lcom/zaxxer/hikari/pool/HikariPool;Lcom/zaxxer/hikari/HikariConfig;Lcom/codahale/metrics/health/HealthCheckRegistry;)V getQueue &()Ljava/util/concurrent/BlockingQueue; "java/util/concurrent/BlockingQueue size submit >(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future; getCount (I)I getWaitingThreadCount values ()Ljava/util/List;
??
? accept B(Lcom/zaxxer/hikari/pool/HikariPool;)Ljava/util/function/Consumer; java/util/List forEach (Ljava/util/function/Consumer;)V - is not suspendable suspend resume isDebugEnabled java/lang/Integer valueOf (I)Ljava/lang/Integer; debug ((Ljava/lang/String;[Ljava/lang/Object;)V recordConnectionUsage
endRequest requite =(Lcom/zaxxer/hikari/util/ConcurrentBag$IConcurrentBagEntry;)V remove =(Lcom/zaxxer/hikari/util/ConcurrentBag$IConcurrentBagEntry;)Z
? run `(Lcom/zaxxer/hikari/pool/HikariPool;Ljava/sql/Connection;Ljava/lang/String;)Ljava/lang/Runnable; execute (Ljava/lang/Runnable;)V getStateCounts newPoolEntry getMaxLifetime &java/util/concurrent/ThreadLocalRandom current *()Ljava/util/concurrent/ThreadLocalRandom; nextLong H(Lcom/zaxxer/hikari/pool/HikariPool;Lcom/zaxxer/hikari/pool/PoolEntry;)V \(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture; setFutureEol )(Ljava/util/concurrent/ScheduledFuture;)V getKeepaliveTime setKeepalive getCause ()Ljava/lang/Throwable; error lastConnectionFailure -Ljava/util/concurrent/atomic/AtomicReference; +java/util/concurrent/atomic/AtomicReference set '(Ljava/lang/String;Ljava/lang/Object;)V (I)Ljava/util/List; iterator ()Ljava/util/Iterator; hasNext next abort "(Ljava/util/concurrent/Executor;)V quietlyCloseConnection add info getLastConnectionFailure ()Ljava/lang/Exception; markEvicted reserve getScheduledExecutor java/util/Optional
ofNullable ((Ljava/lang/Object;)Ljava/util/Optional;
? get B(Lcom/zaxxer/hikari/pool/HikariPool;)Ljava/util/function/Supplier; orElseGet 1(Ljava/util/function/Supplier;)Ljava/lang/Object; W(ILjava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)V 1setExecuteExistingDelayedTasksAfterShutdownPolicy setRemoveOnCancelPolicy shutdownNow '(Lcom/zaxxer/hikari/pool/HikariPool;J)V recordConnectionTimeout getSQLState getErrorCode c - Connection is not available, request timed out after ms (total=, active=, idle=, waiting=) +(Ljava/lang/String;JIIII)Ljava/lang/String; =(Ljava/lang/String;Ljava/lang/String;ILjava/lang/Throwable;)V setNextException (Ljava/sql/SQLException;)V
housekeeper??????????? $java/lang/invoke/StringConcatFactory? Lookup ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; "java/lang/invoke/LambdaMetafactory 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;? %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles 1
A ! "! #$ %&