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??
??
?? ?? ?? ?
??
??
?? ?? ?? ??
? ??
? ??
? ??
? ?
I??
? ? ?
? ?
?
I?
?
I?
?
I?
?
?
I?
I??
0? ? ??
4?
?? ? ??
9?
?? ??
I?
=? ?
A? d
I
Y
Y
I
?
X X X
! "#$
=%
X&
'#(
)*
+,
+-. ?
k0 123
4#5678
9
Y:
;
Y<=}>
?
5 @ ?
B
C
DEF
?G
?HI`J
KL
?MNO
?PQRS
?TU
IW
XYZ
?[\
??^
_`
a
b
Ycde
fg}h
i
j
k
l qrst ?
?v
w
x
y}z{|
}
~
#?
?
?
X? ?
Y?
?
?
I? '
?? (
???
???
X?
I??
??
X???
??}? ?
????}??
?r?????`???
?
?
??}??
?
??
???
??
X?
?
I?
?? ?
?????
??
??
??
????
???#?
k?? ?
??
??
?
?? ?
????? PoolInitializationException InnerClasses
KeepaliveTask MaxLifetimeTask CustomDiscardPolicy HouseKeeper PoolEntryCreator logger Lorg/slf4j/Logger; POOL_NORMAL I
ConstantValue POOL_SUSPENDED
POOL_SHUTDOWN poolState aliveBypassWindowMs J housekeepingPeriodMs EVICTED_CONNECTION_MESSAGE Ljava/lang/String; DEAD_CONNECTION_MESSAGE poolEntryCreator 4Lcom/zaxxer/hikari/pool/HikariPool$PoolEntryCreator; postFillPoolEntryCreator addConnectionQueueDepth +Ljava/util/concurrent/atomic/AtomicInteger; 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; poolEntry "Lcom/zaxxer/hikari/pool/PoolEntry; now timeout e 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
queueDepth
countToAdd 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
isAfterAdd Z 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 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 IConcurrentBagEntry78 !com/zaxxer/hikari/pool/HikariPool??? %com.zaxxer.hikari.aliveBypassWindowMs?????????? 'com.zaxxer.hikari.housekeeping.periodMs?? 2com/zaxxer/hikari/pool/HikariPool$PoolEntryCreator7?"#
After adding 7?$# )java/util/concurrent/atomic/AtomicInteger7V%& $com/zaxxer/hikari/util/ConcurrentBag7?*+?? (com/zaxxer/hikari/util/SuspendResumeLock?101??23?V??ef??ab??ib?????q (java/util/concurrent/LinkedBlockingQueue7l? BootstrapMethods? 5com/zaxxer/hikari/pool/HikariPool$CustomDiscardPolicy'( 8java/util/concurrent/ThreadPoolExecutor$CallerRunsPolicy CallerRunsPolicy)( +com/zaxxer/hikari/pool/ProxyLeakTaskFactory?7 ./ -com/zaxxer/hikari/pool/HikariPool$HouseKeeper
45 "com.zaxxer.hikari.blockUntilFilled
?qll??sqq JM!V"# com/zaxxer/hikari/pool/PoolEntry$?%&\]'( (connection was evicted) (connection is dead)??)+,-./0123V4?? java/lang/InterruptedException5678V java/sql/SQLException97: java/lang/String After shutdown xy;V Before shutdown <=>uVUV??@A 9Timed-out waiting for add connection executor to shutdownBC?V?@D?? 5Timed-out waiting for connection assassin to shutdownEV ;Timed-out waiting for close connection executor to shutdown &com/zaxxer/hikari/pool/ProxyConnectionFVG? (connection evicted by user)H??? #com.codahale.metrics.MetricRegistryIJ Bcom/zaxxer/hikari/metrics/dropwizard/CodahaleMetricsTrackerFactory #com/codahale/metrics/MetricRegistry7K +io.micrometer.core.instrument.MeterRegistry Dcom/zaxxer/hikari/metrics/micrometer/MicrometerMetricsTrackerFactory +io/micrometer/core/instrument/MeterRegistry7L 6com/zaxxer/hikari/pool/PoolBase$MetricsTrackerDelegate MetricsTrackerDelegateM???NOP7Q 9com/zaxxer/hikari/pool/PoolBase$NopMetricsTrackerDelegate NopMetricsTrackerDelegate /com/codahale/metrics/health/HealthCheckRegistryRSTUqVqWX A{} - Add connection elided, waiting={}, adders pending/running={} java/lang/ObjectYZ[\]^_`qaqbcdbe?fghij java/lang/IllegalStateExceptionk7ClV??mVn? 7{} - {}stats (total={}, active={}, idle={}, waiting={}) pqrqtqo?pqrs;KVtuvwxy?z?{?|}~? 1com/zaxxer/hikari/pool/HikariPool$MaxLifetimeTask7?/????? /com/zaxxer/hikari/pool/HikariPool$KeepaliveTask?? 8com/zaxxer/hikari/pool/PoolBase$ConnectionSetupException ={} - Error thrown while acquiring connection from data source????????b java/lang/Exception /{} - Cannot acquire connection from data source\? [{} - Fill pool skipped, pool has sufficient level or currently being filled (queueDepth={}.b????????? java/lang/Throwable $(connection aborted during shutdown)?????q {} - Added connection {}?? 7(initialization check complete and minimumIdle is zero)???? *{} - Exception during pool initialization. =com/zaxxer/hikari/pool/HikariPool$PoolInitializationException7??V?s????????U??? "java/util/concurrent/ThreadFactory 0java/util/concurrent/ScheduledThreadPoolExecutor 5java/util/concurrent/ThreadPoolExecutor$DiscardPolicy
DiscardPolicy7??????c #com/zaxxer/hikari/pool/HikariPool$17? Timeout failure ?V?? (java/sql/SQLTransientConnectionException??7??????? 6com/zaxxer/hikari/util/UtilityElf$DefaultThreadFactory DefaultThreadFactory?7? (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 &(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; java/lang/Boolean
getBoolean (Ljava/lang/String;)Z 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 schedule J(Lcom/zaxxer/hikari/pool/PoolEntry;)Lcom/zaxxer/hikari/pool/ProxyLeakTask; createProxyConnection >(Lcom/zaxxer/hikari/pool/ProxyLeakTask;J)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 warn (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 get incrementAndGet submit >(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future; java/lang/Integer valueOf (I)Ljava/lang/Integer; debug ((Ljava/lang/String;[Ljava/lang/Object;)V getCount (I)I size 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 recordConnectionUsage 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 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V lastConnectionFailure -Ljava/util/concurrent/atomic/AtomicReference; +java/util/concurrent/atomic/AtomicReference set (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;
? 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 = - Connection is not available, request timed out after ms. '(Ljava/lang/String;J)Ljava/lang/String; <(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V setNextException (Ljava/sql/SQLException;)V
housekeeper (Ljava/lang/String;Z)V??????????? $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 ^ ! _ "# $# %&