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
???? 4??
?
?
?
?
?
?
?
??
??? ?? ?
??
??
??
?? ?? ?
?
??
??
?
???
? ?
?
?
?
?
?
?
?
0
4?
4
4
:?
??
?!
C"#
F$ d%&
'(
)*
?+
,-
,.
/0
1
23435
6
?7
8
9
:
;
<=
]> ]?3@ ]A
BCD
E
FGH
CI
]J
KGL
MN
OP
OQRS
pT
UVW
XGYZ[\
]
^
_
`
a
Y
bc
d
e^e`
fg
?h
?ijklm
nop
?qrst
?uv
?x
yz{
?|}
??
????
???
????
?
?
?
? ?????
??
?
?????
?
?
?G?
?
?
]? ?
?
?
?
?? '
?? (
???
??%?
]?
???
??
]???
????
?
?????????
???????k???
?
???
?
??
???
??
]?
?
??
?? ?
?????
??
??
??
??%??
???G?
p???
4??
??
p?
?
??
????? PoolInitializationException InnerClasses
KeepaliveTask MaxLifetimeTask 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 addConnectionQueueReadOnlyView Ljava/util/Collection; Signature ,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 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=VN? shutdown ()V start assassinExecutor &Ljava/util/concurrent/ExecutorService;? evictConnection (Ljava/sql/Connection;)V
connection Ljava/sql/Connection; proxyConnection (Lcom/zaxxer/hikari/pool/ProxyConnection;?gR 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 shouldAdd Z 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 i connectionsToAdd? abortActiveConnections )(Ljava/util/concurrent/ExecutorService;)V Ljava/lang/Throwable;
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/SQLException; 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
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
SourceFile HikariPool.java 8com/zaxxer/hikari/util/ConcurrentBag$IConcurrentBagEntry IConcurrentBagEntry???_/0,-??89 !com/zaxxer/hikari/pool/HikariPool %com.zaxxer.hikari.aliveBypassWindowMs
'com.zaxxer.hikari.housekeeping.periodMs 2com/zaxxer/hikari/pool/HikariPool$PoolEntryCreator8"#
After adding $# $com/zaxxer/hikari/util/ConcurrentBag8? (com/zaxxer/hikari/util/SuspendResumeLock8_212??34?_qrmnun?} (java/util/concurrent/LinkedBlockingQueue8x %& java/lang/StringBuilder! "# connection adder??? ;java/util/concurrent/ThreadPoolExecutor$DiscardOldestPolicy DiscardOldestPolicy$%&)* connection closer 8java/util/concurrent/ThreadPoolExecutor$CallerRunsPolicy CallerRunsPolicy%'+* +com/zaxxer/hikari/pool/ProxyLeakTaskFactory(8) -com/zaxxer/hikari/pool/HikariPool$HouseKeeper8*+,-56 "com.zaxxer.hikari.blockUntilFilled./012345}6789x:x;<= }>}?@AORB_CD com/zaxxer/hikari/pool/PoolEntryEF=GfgHI (connection was evicted) (connection is dead)??JLMNOPQRST_U@?? java/lang/InterruptedExceptionVWXY_ java/sql/SQLException , - Interrupted during connection acquisition8Z java/lang/String After shutdown ??[_ Before shutdown \]^?_^__`a?_@A connection assassinator???b_ &com/zaxxer/hikari/pool/ProxyConnectionc_d? (connection evicted by user)?e #com.codahale.metrics.MetricRegistryfg Bcom/zaxxer/hikari/metrics/dropwizard/CodahaleMetricsTrackerFactory #com/codahale/metrics/MetricRegistry8h +io.micrometer.core.instrument.MeterRegistry Dcom/zaxxer/hikari/metrics/micrometer/MicrometerMetricsTrackerFactory +io/micrometer/core/instrument/MeterRegistry8i 6com/zaxxer/hikari/pool/PoolBase$MetricsTrackerDelegate MetricsTrackerDelegatej???klm8n 9com/zaxxer/hikari/pool/PoolBase$NopMetricsTrackerDelegate NopMetricsTrackerDelegate /com/codahale/metrics/health/HealthCheckRegistryopqrs}tu 0{} - Add connection elided, waiting {}, queue {} java/lang/Objectvwx?yz{|}}~ BootstrapMethods?n??????? java/lang/IllegalStateException - is not suspendable8??_?_? 7{} - {}stats (total={}, active={}, idle={}, waiting={}) |}~}?}??????[P_?????????????? 1com/zaxxer/hikari/pool/HikariPool$MaxLifetimeTask8?P???? /com/zaxxer/hikari/pool/HikariPool$KeepaliveTask?? 8com/zaxxer/hikari/pool/PoolBase$ConnectionSetupException ={} - Error thrown while acquiring connection from data source????????n java/lang/Exception /{} - Cannot acquire connection from data sourcey? 4{} - Fill pool skipped, pool is at sufficient level.y?~??????? java/lang/Throwable $(connection aborted during shutdown)???? {} - Added connection {} 7(initialization check complete and minimumIdle is zero)???? *{} - Exception during pool initialization. =com/zaxxer/hikari/pool/HikariPool$PoolInitializationException8??_????????????? "java/util/concurrent/ThreadFactory 0java/util/concurrent/ScheduledThreadPoolExecutor 5java/util/concurrent/ThreadPoolExecutor$DiscardPolicy
DiscardPolicy8?????? #com/zaxxer/hikari/pool/HikariPool$18? Timeout failure ?_?? (java/sql/SQLTransientConnectionException 8 - Connection is not available, request timed out after "? ms.8????? 6com/zaxxer/hikari/util/UtilityElf$DefaultThreadFactory DefaultThreadFactory housekeeper8? (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/ExecutorService java/sql/Connection org/slf4j/Logger [Ljava/lang/Object; 'java/util/concurrent/ThreadPoolExecutor java/util/concurrent/Callable java/util/Iterator 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 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 java/util/Collections unmodifiableCollection .(Ljava/util/Collection;)Ljava/util/Collection; poolName append -(Ljava/lang/String;)Ljava/lang/StringBuilder; !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; ?(ILjava/lang/String;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)Ljava/util/concurrent/ThreadPoolExecutor; getLeakDetectionThreshold 3(JLjava/util/concurrent/ScheduledExecutorService;)V K(Lcom/zaxxer/hikari/pool/HikariPool;Lcom/zaxxer/hikari/pool/HikariPool$1;)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 isConnectionAlive (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 *(Ljava/lang/String;Ljava/lang/Throwable;)V close $java/util/concurrent/ScheduledFuture cancel (Z)Z getLoginTimeout awaitTermination #(JLjava/util/concurrent/TimeUnit;)Z 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 java/util/Collection size 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 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 (Ljava/lang/String;)V 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 '(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 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 (Z)V setRemoveOnCancelPolicy shutdownNow '(Lcom/zaxxer/hikari/pool/HikariPool;J)V recordConnectionTimeout getSQLState (J)Ljava/lang/StringBuilder; <(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V setNextException (Ljava/sql/SQLException;)V (Ljava/lang/String;Z)V????????? "java/lang/invoke/LambdaMetafactory metafactory? Lookup ?(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 c ! d "# $# %&